<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Note: in<b> 'call' : Update</b> ,Update it is a function defined in my python script. My dictionary is too large so i taught rather than using directly in python program I save it in a text file and when needed i assign it to dictionary object . How can i assign this text file to dictionary object and call it?</div>


<div><br></div></div></blockquote><div><br></div><div>To introduce some terms: you are "serializing" some data --- your dictionary --- to disk and back.  There are a few libraries that help you do the hard work of translating the nested dictionary structure to some flat string; in addition, they almost always includes a parser to go back from that flat string back to the nested dictionary structure.  The 'json' library that Petter Otten suggests is one of these serialization libraries.  Try looking into that and see if you can just take advantage of it.</div>

<div><br></div><div>Are there other consumers for this data besides just your program?</div><div><br></div></div></div></div>