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
_______________________________________________ Chennaipy mailing list Chennaipy@python.org https://mail.python.org/mailman/listinfo/chennaipy