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
|
2880 Discussions
|
Please Login in order to post a comment
def solve(s): output = [] for word in s.split(): if word.isalpha()==True: output.append(word.title()) else: output.append(word)
def solve(s): output = [] for word in s.split(): if word.isalpha()==True: output.append(word.title()) else: output.append(word)
Hi guies, you can go two ways:
way 1 is +=:
way 2 is list comprehension:
def solve(s):
if name == 'main': fptr = open(os.environ['OUTPUT_PATH'], 'w')
can you show me how simply can i solve this problem