Python practice - string in reverse

Enter a string, the string in reverse order, then outputs a string in reverse order.

Input formats:

A given input does not exceed 80 characters in length, to enter the end of the non-empty string in a row.

Output formats:

The reverse string in the output line.

Sample input:

Hello World!

Sample output:

!dlroW olleH

print(''.join(list(reversed(input()))))
Published 165 original articles · won praise 5 · Views 8624

Guess you like

Origin blog.csdn.net/linjiayina/article/details/104365491