I wanted to know how I could read ONLY the FIRST WORD of each line in a text file. I tried various codes and tried altering codes but can only manage to read whole lines from a
with Open(filename,"r") as f: wordlist = [r.split()[0] for r in f]