When you store the dictionary in tinyDB the keys ( numbers ) are stored as strings ( e.g. 12 becomes "12" ) , and afterwards , after reading back from tinyDB you try to retrieve key 12 and that does not exist. Best practice is to use strings as keys.
2 Likes