Add Keys to a Dictionary

Currently I am helping my teacher out with a soccer statistics app he will be able to use next season. As of right now I'm trying to figure out how to make it possible so that when I click on the list of seasons we've create, once I choose a season it will take me to that list of games. I'm not quite sure how I would do this just using lists and list pickers, but I'd love to see if I could. However, I think it would be easiest if there was a function to add keys to a dictionary. Is this an actual functionality, or am I going to have to work with just lists and list pickers. I've attached the code I'm working with at the moment. Any help would be greatly appreciated.

Hi @Alexander_Porter,

You use the set value for key in dictionary to value block to add information to the dictionary. If the key isn't in the dictionary, it will be added. If the key is in the dictionary, its corresponding value will be overwritten with the new value.

dictionaries_set_pair

1 Like

Dictionaries are nice for short term in-memory indexed storage.

For longer term storage, TinyDB offers similar functionality.

Here is a sample app similar to your requirement, using compound TinyDB tags ...

1 Like