Guest User

Untitled

a guest
Nov 16th, 2019
143
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from FCC_database.file_read_backwards import FileReadBackwards
  2.  
  3. with FileReadBackwards("FCC_database/EN.dat",encoding="utf-8") as in_file, open("calldata.txt", 'w') as out_file:
  4. callsign_set = set()
  5. for line in in_file:
  6. line_list = line.split('|')
  7. if line_list[4] in callsign_set:
  8. continue
  9. else:
  10. callsign_set.add(line_list[4])
  11. out_file.write(line_list[4] + "," + line_list[7] + "," + line_list[15] + "," + line_list[16] + "," + line_list[17] + "," + line_list[18] + "\n")
RAW Paste Data