You are viewing a single comment's thread. Return to all comments →
multi space lost print('hello world lol'.split()) -> ['hello', 'world', 'lol']
def solve(s): return re.sub(r"(^\w)|(?<=\s)(\w)", lambda c : c.group(0).capitalize(), s)
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 →
multi space lost print('hello world lol'.split()) -> ['hello', 'world', 'lol']