Skip to content

Instantly share code, notes, and snippets.

@cloverrose
Created June 16, 2013 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cloverrose/5791313 to your computer and use it in GitHub Desktop.
Save cloverrose/5791313 to your computer and use it in GitHub Desktop.
draftcode sensei test
# -*- 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