You are viewing a single comment's thread. Return to all comments →
def solve(s): return s.title() #use this string method title()
if name == 'main': fptr = open(os.environ['OUTPUT_PATH'], 'w')
s = input() result = solve(s) fptr.write(result + '\n') fptr.close()
No, using 'title' didn't satisfy all test cases.This is not a precise approach to this problem
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Capitalize!
You are viewing a single comment's thread. Return to all comments →
def solve(s): return s.title() #use this string method title()
if name == 'main': fptr = open(os.environ['OUTPUT_PATH'], 'w')
No, using 'title' didn't satisfy all test cases.This is not a precise approach to this problem