Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- for i in range(n):
- words = input().split()
- final = ""
- for j in range(len(list(reversed(words)))):
- if j == 0:
- final += list(reversed(words))[j]
- else:
- final += " " + list(reversed(words))[j]
- print ("Case #" + str(i + 1) + ":", final)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement