Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. def convert(in_file, out_file):
  2. name = ""
  3. for line in in_file:
  4. line = line.strip()
  5. print(line)
  6. if line == "":
  7. continue
  8. if line.startswith('"'):
  9. name = line.strip('"')
  10. print("NAME:: " + name)
  11. else:
  12. out_file.write("{0}\n".format(','.join([name] + line.split("\t")) ) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement