Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Create a function that accepts a string and returns the same string reversed.
- '''
- string = input("Give me a string. ")
- def string_reversed(string):
- reversed = []
- for i in string:
- reversed.insert(0,i)
- a = ''.join(reversed)
- return a
- print(string_reversed(string))
Advertisement
Add Comment
Please, Sign In to add comment