How to use dictionary in python code for a beginner, help wanted. #128246
Unanswered
Rolingmaniac
asked this question in
Programming Help
Replies: 2 comments
-
To read files in python, you need to open() them and then read() them. Basically, opening a file allows you to access it and reading just reads the contents of the file. In your code, the words variable are the words from the other file "dictionary.txt". They are essentially now linked together. You can learn more here: https://www.w3schools.com/python/ref_file_read.asp |
Beta Was this translation helpful? Give feedback.
0 replies
-
Capitalize the "D" in the dictionary in your code to ensure it is correctly mapping to the txt file. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
I am completely new to this and would appreciate any help with my problem, I would like to use a dictionary to try to decrypt a vigenere cipher, AI has written the code so I have no idea wha I’m doing, I have a dictionary.txt file I would like to use, but I can’t figure out how to link it to the code. Se pictures of how it looks now, what is the next step to link the two together?
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions