0
How to get reverse output of a string using python?
2 Respostas
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.