394 B
394 B
title, type, tags, cover, dateModified
| title | type | tags | cover | dateModified | |
|---|---|---|---|---|---|
| Capitalize every word | snippet |
|
trippy-chemicals | 2020-11-02T19:27:07+02:00 |
Capitalizes the first letter of every word in a string.
- Use
str.title()to capitalize the first letter of every word in the string.
def capitalize_every_word(s):
return s.title()
capitalize_every_word('hello world!') # 'Hello World!'