7 Answers
+ 3
Confidence Eburue
print(input("Enter input : ")[::-1])
+ 2
You do slicing or can use .reverse () function also
+ 2
text=input()
print(text[::-1])
+ 1
Confidence Eburue Here's another possible work-around without slicing the string:
def reverse(string):
buff = ""
for i in range(len(string) - 1, -1, -1):
buff += string[i]
return buff
Edit: Self-liked my comment due to unwanted disliking.
+ 1
var_name=input()
print(var_name[::-1])
0
You can also use reverse function for list , then rejoin to form a string.
this might work...
i=list(input())
i.reverse()
j="".join(i)
print(j)