We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Strings
- Capitalize!
- Discussions
Capitalize!
Capitalize!
Sort by
recency
|
2681 Discussions
|
Please Login in order to post a comment
def solve(s): tmp_s = s.split(" ") return " ".join(x.capitalize() for x in tmp_s)
This can be much easier to understand and efficient. Try this ...
There can be better and more efficient approaches, but this is my try: (I dont easily understand one-liner codes in comments, thought this might be helpful for comeone :)