Aug-11-2018, 10:28 AM
(This post was last modified: Aug-11-2018, 10:29 AM by sweet_swiss.)
Did some progress I think and added the split and sorted function.
evens, odds = set(), set() with open('textfile.txt') as f: for index, row in enumerate(f): if index % 2 == 0: evens.update(row.split()) else: odds.update(row.split()) commons = sorted(evens & odds)Any tips how I can find the unique words on the even and odd lines?