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

Book errata(on page 81) #3

Open
pxtalk opened this issue Feb 13, 2018 · 1 comment
Open

Book errata(on page 81) #3

pxtalk opened this issue Feb 13, 2018 · 1 comment

Comments

@pxtalk
Copy link

pxtalk commented Feb 13, 2018

x = [1, 2, 3]
>>> y = [2, 4]
x is not y

should be:

x = [1, 2, 3]
>>> y = [2, 1]
x is not y

@georgiosdoumas
Copy link

The example as appears on the book is correct. There is no need for editing anything.
Here is the example on a more elaborate form as I did it on my IDLE:

x=[1,2,3]
y=[2,4]
x is not y
True
del x[2]
x
[1, 2]
y[1]=1
y
[2, 1]
y.reverse()
y
[1, 2]
x==y
True
x is y
False
Please delete this issue, or mark it as solved.

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

2 participants