solving question "count number of spaces in a string" (#201)
This commit is contained in:
parent
89d53e4a02
commit
b4cfd42a81
@ -3974,6 +3974,15 @@ Detailed answer can be found here: http://codingshell.com/python-all-string-perm
|
|||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Count the number of spaces in a string</summary><br><b>
|
<summary>Count the number of spaces in a string</summary><br><b>
|
||||||
|
|
||||||
|
You can use the "count" method like this:
|
||||||
|
|
||||||
|
```python
|
||||||
|
|
||||||
|
ImAString.count(" ")
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
</b></details>
|
</b></details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
Loading…
Reference in New Issue
Block a user