[Chennaipy] Python interpreter
venkata krishnan
ve_krish at yahoo.com
Fri Jul 1 13:02:20 EDT 2016
Dear Ranjit,
The interpreter is not confused. It actually points out the ambiguity in that code/intention.An variable cannot be a global and local within that function's scope. In this scenario you have to use theglobal keyword. Please check the topic [Global vs. Local Variables and Namespaces | here]
|
| |
Python3 Tutorial: Global vs. Local Variables and Namespaces
Global versus local Variables, i.e. when and how to use global and local variables in Python namespaces. | |
|
ThanksVenkat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chennaipy/attachments/20160701/9fa3abfa/attachment.html>
More information about the Chennaipy
mailing list