Created
June 16, 2013 07:53
-
-
Save cloverrose/5791313 to your computer and use it in GitHub Desktop.
draftcode sensei test
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
# -*- coding:utf-8 -*- | |
def main(s, a): | |
ret = '' | |
flg = False | |
for i in s: | |
if i != a: | |
ret += i | |
flg = False | |
elif not flg: | |
ret += i | |
flg = True | |
return ret | |
if __name__ == '__main__': | |
import sys | |
s, a = sys.argv[1:] | |
print main(s, a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment