A doubt in the fourth Edition of python Learning Manual

I, a rookie, just started to learn Python. The example above on page 557 of Chapter 22 is shown below.

-sharp small.py
x = 1
y = [1,2]
-sharp new1.py
from small import x,y
x = 42
y[0] = 42
-sharp new2.py
import small
print(small.x)
print(small.y)

the execution result said in the book is

1
[42, 2]

but the test result on my own computer is

1
[1, 2]
Jul.06,2021

to achieve the effect in the book, you need to execute two pieces of code in the same session . If you perform the operations in new1.py in two sessions, of course, it will not affect the data in new2.py.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e490fd-4405b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e490fd-4405b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?