Capitalize!

  • + 0 comments
    # Complete the solve function below.
    def solve(s):
        temp_st =''
        for i in range(0,len(s)):
            if i == 0:
                temp_st = s[i].upper()
            elif s[i-1] == ' ':
                temp_st = temp_st + s[i].upper()
                i +=2
            else:
                temp_st = temp_st + s[i]
        return temp_st