Created
June 19, 2014 18:30
-
-
Save yokiy/01c7f6d7eaa3c855652a to your computer and use it in GitHub Desktop.
CC1.4
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 replaceS(s): | |
replist = list(s) | |
for i in range (0, len(s)): | |
if ord(replist[i]) == 32: | |
replist[i] = '20%' | |
newlist = ''.join(replist) | |
return newlist | |
s = raw_input('Input a string:') | |
print replaceS(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment