From b4cfd42a8126b063e0994e290c8d5efa52dea5ca Mon Sep 17 00:00:00 2001 From: Juan Manuel Vazquez Date: Sun, 23 Jan 2022 14:19:24 -0600 Subject: [PATCH] solving question "count number of spaces in a string" (#201) --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index e993a8f..4647ea6 100644 --- a/README.md +++ b/README.md @@ -3974,6 +3974,15 @@ Detailed answer can be found here: http://codingshell.com/python-all-string-perm
Count the number of spaces in a string
+ +You can use the "count" method like this: + +```python + +ImAString.count(" ") + +``` +