Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError when assigning a to b #1

Open
JeppeDruedahl opened this issue Jan 6, 2020 · 1 comment
Open

NameError when assigning a to b #1

JeppeDruedahl opened this issue Jan 6, 2020 · 1 comment

Comments

@JeppeDruedahl
Copy link
Contributor

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
Copy link
Contributor Author

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

Try

b = 3
a = b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant