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