with open("test.txt", "r", encoding='UTF-8') as f: data = f.read() mylist = data.split() print(mylist)