Re: Global command doesn't seem to work...

2015-08-14 Thread Chris Angelico
On Thu, Aug 13, 2015 at 9:06 PM, Dwight GoldWinde wrote: > global subwordsDL > from Functions import subwords > subwords () > print (subwordsDL) > print (subwordsDL['enjoy'][2]) In Python, "global" means module-level. The easiest way to do this would be to import the Functions module directly (ra

Global command doesn't seem to work...

2015-08-14 Thread Dwight GoldWinde
Inside of Functions.py I define the function: def subwords (): global subwordsDL subwordsDL = {'enjoy':['like', 'appreciate', 'love', 'savor'], 'hurt':['damage', 'suffering']} print (subwordsDL) Return In my test code module, the code is: global subwordsDL from Functions import subwords subwords