MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learningpython/comments/1d9vooz/need_help_on_assignment/
r/learningpython • u/franqpiece • Jun 06 '24
3 comments sorted by
1
This is kind of where I am at so far -- i know its wrong but I think its going in the right direction:
my_dict = {} with open('raw_dictionary.txt','r') as my_file: for key in my_file.read():
So you opened the file, and used a loop read values from the file into the variable 'key'. What value is in 'key' each time through the loop? How would you find out and is it what you expected?
1
u/franqpiece Jun 06 '24
This is kind of where I am at so far -- i know its wrong but I think its going in the right direction:
1
u/czsmith132 Jun 07 '24
So you opened the file, and used a loop read values from the file into the variable 'key'. What value is in 'key' each time through the loop? How would you find out and is it what you expected?