Capitalize!

  • + 0 comments

    def solve(s): s = list(s) s[0] = s[0].upper() for i in range(1, len(s)): if s[i].isalpha() and s[i-1].isspace(): s[i] = s[i].upper() return ''.join(s)