#The string you want to invert str = '12345' #String[::-1]Can be reversed rslt = str[::-1] print(rslt) # => '54321'
-String inversion in Python -Notes from non-programmers
Recommended Posts