5 Antworten
+ 5
Edward Marais ,
here is a link to a sample tutorial from the community section that demonstrates the use of dictionary.get()
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2451/?ref=app
+ 2
You can use the get method on the dictionary.
+ 2
Edward Marais The get method is specifically FOR dictionaries in this instance. You provide the key between the parenthesis and then it will return the value that's associated with said key.
+ 1
will the get method work if the data in the file is stored as a dictionary?
#please note the file just has:
word_meaning = {
"house":"place that a entity lives in",
"wood":"comes from a tree"
}
+ 1
I need help can someone just show me on discord or something :
Edward_S #5214
this is file handling just note that