Created
July 18, 2018 09:34
-
-
Save amigojapan/f6912877f8c7194ac5e0a0c5f7c9c1fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reverse_string(originalStr): | |
r="" | |
for ch in range(len(originalStr),0,-1): | |
r=r+originalStr[ch-1] | |
return r | |
originalStr = input("enter a string:") | |
print("your string reversed is:"+reverse_string(originalStr)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment