Advertisement
A_God

Reverse

Jul 22nd, 2021
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. 1   #__________reverse string______________#
  2. 2   y = str(input('enter a string'))
  3. 3   lenvar = len(y)
  4. 4   arr = list(y)
  5. 5   arr.reverse()
  6. 6   print (f'length of your string is {lenvar}, I have converted this : {y} to Reverse: {arr}')
  7. 7   print ("".join(arr))
  8. 8   #. _____________.#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement