error in python program -
i tried simple python program:
x == 3 print xbut error:
traceback (most recent phone call last): file "", line 1, in nameerror: name 'x' not definedwhy?
==
comparison, not assignment. you're asking if x equal 3, haven't told python x yet.
you want this:
x = 3 print x
python
No comments:
Post a Comment