Yes, vocabulary .get(direction) works for what I needed,
Also I corrected my problem by adding an string word=direction
Before the for loop like so
There are most likely better ways to use a dictionary but at this point this is what the instructor is doing so I’m following along but trying to grasp a complete understanding before moving on to another section.
Also I corrected my problem by adding an string word=direction
Before the for loop like so
word=direction if len(direction)>1: for words in vocab: direction = vocab[word]Also I get it’s annoying that I keep asking these questions but I feel like every body has to start somewhere and if I don’t ask questions how am I supposed to learn.
There are most likely better ways to use a dictionary but at this point this is what the instructor is doing so I’m following along but trying to grasp a complete understanding before moving on to another section.