Global variables don't get affected in Streamlit blocks

Hi @Kareem_Amr,

I think the db variable is getting reset to the empty dict every time script runner is re-running your script on change. If you are looking to keep state in a session, have a look at this link, Multi-page app with session state