String Split and Join

  • + 5 comments

    Your solution is even more elegant, but here's mine for those interested:

    print "-".join(raw_input().split())