How can I import words from a document into my python file?
Question:
[Pycharm] Hi, I am very new to programming and I wanted to make the Hangman game in python. I want to import words from the dictionary. In that way the computer chooses a random word, and the user have to guess it.
It is this video I am following: https://www.youtube.com/watch?v=8ext9G7xspg&t=1465s
In this video she imported a words list, that she used. However I want to make one in my language. I found one online dictionary who shares their data files, and it is a tar file.
enter image description here
The words are behind the dash – in the list. How can I retrieve only these words? and how do i import these words into my python file.
Answers:
This would be a good start: stackoverflow.com/questions/30216573/… (if the words are always in column 3). –
Demi-Lune
Sep 25 at 19:17
[Pycharm] Hi, I am very new to programming and I wanted to make the Hangman game in python. I want to import words from the dictionary. In that way the computer chooses a random word, and the user have to guess it.
It is this video I am following: https://www.youtube.com/watch?v=8ext9G7xspg&t=1465s
In this video she imported a words list, that she used. However I want to make one in my language. I found one online dictionary who shares their data files, and it is a tar file.
enter image description here
The words are behind the dash – in the list. How can I retrieve only these words? and how do i import these words into my python file.
This would be a good start: stackoverflow.com/questions/30216573/… (if the words are always in column 3). –
Demi-Lune
Sep 25 at 19:17