Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. lines = open('/Users/y1275963/Dropbox/asmcodes/asmcodes_a28/615.asm', 'r').readlines()
  2. text_file = open("/tmp/Output.txt", "w")
  3. for item in lines:
  4. sep = ';'
  5. item_all = item.split(sep, 1)
  6. if len(item_all) > 1 :
  7. item = item_all[0]
  8. text_file.write(item)
  9. text_file.write('\n')
  10. else:
  11. text_file.write(item)
  12.  
  13. text_file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement