Have you ever use tinyDB or other databases to store value? When there are so many data you have to store, you don’t wanna store it with so many
call tinyDB store block. Therefore, the dictionary component is here to help.
Dictionary is a built-in component.
Generally speaking, a dictionary uses a key to call and get the value.
It will return the string
a dictionary uses a key to call and get the value.
The same logic as TinyDB, but we use the dictionary this time
The dictionary now acts like tinyDB, which can be used to store almost every type of value.
Using the example above,
if the key doesn’t exist, return “not found”.
It isn’t hard to achieve. If you want to replace with a new value, do this
Remember to store the dictionary with tinyDB as well.
Similar to storing a new value, but it will create a new pair of key and value.
It is really useful when you have to store many data. There are also many features in the dictionary such as return the list of key and value.
If you find a helpful and you have time, leave a like
Ask anything if you have any question, I will try to answer as much as I can.