You are viewing a single comment's thread. Return to all comments →
Only thing to mark here is that there are multiple whitespaces in the test cases which needs to be there in our output as well.
Simple Solution:
def solve(s):
l=[] for i in s: l.append(i) l[0] = l[0].upper() for i in range(1,len(l)): if l[i-1]==" ": l[i] = l[i].upper() ans = "".join(l) return ans
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 →
Only thing to mark here is that there are multiple whitespaces in the test cases which needs to be there in our output as well.
Simple Solution:
def solve(s):