Capitalize!

  • + 0 comments

    I think this would not work under this case: "hello worldhello lol"

    You would have: "Hello worldHello Lol"

    instead of: "Hello Worldhello Lol"

    Here's my code:

    Snew = ""
    go = True
    for let in S:
        if let == " ":
            go = True
        elif go:
            let = let.capitalize()
            go = False
        Snew = Snew + let
    return Snew