Good lesson, I learned a lot about creating functions. However wehn I tried to run your one line code I recieved some errors. Could someone look at my code and help? def expand(word): return {"can't": "can not", "don't": "do not", "won't": "will not"}.get(word, default = word) word = “don’t" print (expand(word))
Whoops, I made a mistake! The ‘default’ label isn’t supposed to be there, so it’s just get(word, word). Not sure how to go about fixing that in the video...