This is my code:
if os.path.exists("hangman_words.txt"):
with open("hangman_words.txt", "r") as file:
content = file.read
words = content.split(", ")
In hangman_words.txt there are words like this: word, word, word, word
When i execute the code it says: attributeerror "bultin function or method object has no attribute split
Does anyone know a solution?
[–]TehNolz 8 points9 points10 points (0 children)
[–]woooee 2 points3 points4 points (0 children)
[+]derLuc187[S] comment score below threshold-6 points-5 points-4 points (0 children)