Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import sys
- import string
- def read_input(file, separator='\t'):
- for line in file:
- line.replace('\'', '').replace('[', '').replace(']', '').replace(',', '').replace(' ','\t')
- yield line.rstrip().split(separator)
- def main():
- ascii_letters = set(string.ascii_letters)
- data = read_input(sys.stdin)
- for line in data:
- key = line[0].strip()
- try:
- value = line[1].strip()
- except:
- value = "_error_"
- print '%s\t%s' % (key, value)
- if __name__ == "__main__":
- main()
Add Comment
Please, Sign In to add comment