You are viewing a single comment's thread. Return to all comments →
def solve(s): result="" cap = False for i in range(len(s)): if i ==0 and s[i].islower(): result+=s[i].upper() elif s[i]==' ': cap = True result += s[i] elif cap and s[i] !=' ': result += s[i].upper() cap = False else: result+=s[i] return result
Seems like cookies are disabled on this browser, please enable them to open this website
Capitalize!
You are viewing a single comment's thread. Return to all comments →