teromakotero

Untitled

May 5th, 2019
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. '''
  2. Create a function that accepts a string and returns the same string reversed.
  3. '''
  4. string = input("Give me a string. ")
  5.  
  6. def string_reversed(string):
  7.     reversed = []
  8.     for i in string:
  9.         reversed.insert(0,i)
  10.     a = ''.join(reversed)
  11.     return a
  12.        
  13.        
  14. print(string_reversed(string))
Advertisement
Add Comment
Please, Sign In to add comment