I need to read some words text by text in python, and I am getting this error. \"NameError: global name \'wordList\' is not defined.
i=0 with fitxer as f: fo
You haven't defined wordList before you try to use it in your loop or return it.
wordList
Try adding wordList = [] below i=0 to declare wordList as an empty list.
wordList = []
i=0
Also, you should use wordList.append(i) to add your word this list.
wordList.append(i)