Capitalize!

Sort by

recency

|

2766 Discussions

|

  • + 0 comments
    def solve(s):
        string_list = s.split(" ")
        final = ""
        for i in string_list:
            final += i.capitalize() + ' '
        return final
    
  • + 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)

  • + 0 comments
    def solve(s):
        return_name = ""
        for i in s.split(" "):
            return_name = return_name + " " + i.capitalize()
        return return_name.strip()
    
  • + 0 comments
    def solve(s):
        return " ".join(list(map(lambda x: x.capitalize(), s.split(" "))))
    
  • + 0 comments

    very bad exercise.