Why does the following assignment statement generate an error?

>>> x.y = 5
Traceback (most recent call last):
File "", line 1, in
NameError: name 'x' is not defined

The x.y is not a valid name; Python parses it as “apply method y to object
x.” Python reports that x is not defined.

Computer Science & Information Technology

You might also like to view...

The ________ printer is the one that is used when you click the Print button

Fill in the blank(s) with correct word

Computer Science & Information Technology

________ operations return a value of true or false

Fill in the blank(s) with correct word

Computer Science & Information Technology