<div dir="ltr"><div>Hi All!</div><div>Hope everyone is well.</div><div><br></div>In my code there are many dictionaries and lists which are used in various functions. Is it better/pythonic/efficient to have these inside the function itself or declared at the beginning of the program in which case they will be global? They are all read only. I understand that global constants and variable have memory allocated to them but when declared inside a function are created on the fly, used and discarded. Please enlighten me further on this and correct me if i'm wrong. <br clear="all">
<div><br></div><div>Thank you for your time and may you be well.</div>-- <br><div dir="ltr">Diliup Gabadamudalige<br><br><a href="http://www.diliupg.com" target="_blank">http://www.diliupg.com</a><br><a href="http://soft.diliupg.com/" target="_blank">http://soft.diliupg.com/</a><div>
<br>**********************************************************************************************<br>This e-mail is confidential. It may also be legally privileged. If you are not the intended recipient or have received it in error, please delete it and all copies from your system and notify the sender immediately by return e-mail. Any unauthorized reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.<br>
**********************************************************************************************<br><br></div></div>
</div>