14 lines
301 B
Markdown
14 lines
301 B
Markdown
### capitalize_every_word
|
|
|
|
Capitalizes the first letter of every word in a string.
|
|
|
|
Uses `str.title` to capitalize first letter of evry word in the string.
|
|
|
|
```python
|
|
def capitalize_every_word(string):
|
|
return string.title()
|
|
```
|
|
|
|
```python
|
|
capitalize_every_word('hello world!') # 'Hello World!'
|
|
``` |