Advertisement
Grafundzijus

Reverse string

Apr 23rd, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. # Create a function that accepts a string and returns the same string reversed.
  2.  
  3. def string_reverse():
  4.     word = str(input('Please enter your word: '))
  5.     word=(word[::-1])
  6.     return(word)
  7.  
  8. print(string_reverse())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement