0
How to get reverse output of a string using python?
2 Answers
0
'abcd'[::-1]
0
Hi! Maybe itâs a bit cumbersome, but you can even use:
print("".join(reversed(s)))
where âsâ is a string and where âreversedâ return an reversed iterator of s. âjoinâ concatenate what âreversedâ return without any spaces between the letters.