Last active
April 29, 2018 22:32
-
-
Save SirSaleh/006373c4880def318af8c7895657f044 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 rev(word): | |
out = "" | |
chars = [xx for xx in word] | |
for char in chars: | |
out = char + out | |
return out | |
if __name__=='__main__': | |
rev('a Sentence for reverse!') | |
#out put | |
#'!esrever rof ecnetneS a' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment