You are viewing a single comment's thread. Return to all comments →
def solve(s): f_n = "" f=list(s.split(" ")) for word in f: if word[0].isalpha(): f_n =f_n +" "+ word[0].upper()+word[1:] #if word.islower() else else: f_n = f_n +" "+ word
f_n=f_n.lstrip() return f_n
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Capitalize!
You are viewing a single comment's thread. Return to all comments →
help test case
def solve(s): f_n = "" f=list(s.split(" ")) for word in f: if word[0].isalpha():
f_n =f_n +" "+ word[0].upper()+word[1:] #if word.islower() else else: f_n = f_n +" "+ word