Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 60)
60.
How can you read a line of text from the console, reverse it, and print the result?
print(reverse(input("Enter a line of text: ")))
line = input("Enter a line of text: "); print(line.reverse())
text = input("Enter a line of text: "); print(text[::-1])
reversed_text = reverse_text(input())
Answer: Option
Explanation:
To read a line of text from the console, reverse it, and print the result, use text = input("Enter a line of text: "); print(text[::-1]).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.