How can I call a dictionary created in one function to another?
I have tried using How do I access a dictionary from a function to be used in another function? but it doesn't work for me.
I have created dictionary1
in server()
and I want to use it in create_csv()
.
How can I call it?
def server(id):dictionary1 = dict(zip(temp_sourcenodes, sip))dictionary1.update(dict(zip(temp_destnodes, dip)))print(dictionary1)def create_csv():