Tweeted By @DynamicWebPaige
Oh, rad: did you know that you can use functions as values in a Python dictionary? 🐍
— 👩💻 Paige Bailey #BlackLivesMatter (@DynamicWebPaige) November 4, 2021
You can define the lambda function as a reference to the keys of the dictionary, and then you can pass arguments to it and evaluate it.
😘 Unsolicited {dict} pic: pic.twitter.com/CwiPKfNuIU