Created
February 13, 2018 08:41
-
-
Save MohanSha/e5f07eba8bb9eeab07a6177b49ed65aa to your computer and use it in GitHub Desktop.
Enter a string and the program will reverse it and print it out.
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
# Reverse a String | |
# Enter a string and the program will reverse it and print it out. | |
def reverse_string(string): | |
return string[::-1] | |
string = raw_input('String: ') | |
print reverse_string(string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment