I want to collect the data from the first line in each .txt file, all the files are in the same folder. I then want to save it in the variable: (addPlayer) This will be needed to add items to a pqt5 list Folder directory: C:\Users\Hendre\OneDrive\Documents\CourseWorkProject\Players
Code:
for files in Players:
addPlayer = #first line of file
self.playerlist.addItem(addPlayer)