Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- userInput = raw_input("Please enter a sentence:")
- print
- print
- column1 = "word"
- column2 = "reversed"
- print column1.ljust(20), column2.ljust(20)
- column1 = "----"
- column2 = "--------"
- print column1.ljust(20), column2.ljust(20)
- for w in userInput.split():
- print "%-20s" % w,
- print "%-20s" % w[::-1]
Advertisement
Add Comment
Please, Sign In to add comment