Created
April 13, 2017 16:45
-
-
Save opethe1st/0856dd646647910431dad319d2c6b044 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 flip(s): | |
res = [] | |
for l in s: | |
if l=='+': | |
res.append('-') | |
else: | |
res.append('+') | |
return "".join(res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment