Global command doesn't seem to work...

Chris Angelico rosuav at gmail.com
Sat Aug 15 02:56:11 EDT 2015


On Thu, Aug 13, 2015 at 9:06 PM, Dwight GoldWinde <Dwight at goldwinde.com> 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 (rather than using a
from-import), and then you can use Function.subwords and
Functions.subwordsDL.

ChrisA



More information about the Python-list mailing list