NumEconCopenhagen / lectures-2020

MIT License
12 stars 29 forks source link

NameError when assigning a to b #1

Open JeppeDruedahl opened 4 years ago

JeppeDruedahl commented 4 years ago

I get a NameError when assigning b to a

>>> a = b
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'b' is not defined
JeppeDruedahl commented 4 years ago

The reason that you get an name error is that b has not been assigned a value yet.

Try

b = 3
a = b