String Reverse

A string S is passed as input to the program. The program must reverse the string and print the reversed value.

Input Format:
The first line will contain the value of the string S.

Example Input/Output 1:
Input:
abcde

Output:
edcba


Example Input/Output 2:
Input:
abba

Output:
abba

s=input();print(s[::-1])

Previous Article

Matrix Rotation - Anti Clock Wise

Next Article

Replace Border with String

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *