a guest Jun 25th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- input_file = r"C:\\Users\esf\Desktop\ExcelviaPython\AsReceived.txt"
- output_file = r"C:\\Users\esf\Desktop\ExcelviaPython\UniqueValues.txt"
- with open(input_file) as in_file:
- counter = 0
- ListIncludingDupes = 
- UniqueList = 
- for line in in_file.readlines():
- numsemicolons = line.count(";")
- if numsemicolons == 0:
- linelist = line.split(";")
- for line_element in linelist:
- for potential_unique in ListIncludingDupes:
- if potential_unique == '\n':
- elif potential_unique.strip() not in UniqueList:
- with open(output_file, "a") as out_file:
- for value in UniqueList:
- out_file.write('%s\n' % value)
RAW Paste Data