Skip to content
Y
yTube.SITE v8.0.4
media / worlds / tools / internet oddities
YouTube / video information

Python List Assignment Explained: Why Does b[1] Print 20? ๐Ÿค” #python #pythonquiz

Video information, playback and saved actions.

Python List Assignment Explained: Why Does b[1] Print 20? ๐Ÿค” #python #pythonquiz

Description: โœ… Correct Answer: A) 20

Explanation:

When we write `b = a`, both variables refer to the original list `[10, 20, 30]`.

Later, when `a = [40, 50]` executes, Python makes `a` refer to a new list. It does not change the original list referenced by `b` ...ย Close description
ย ย ย ย ย ย 
Videos related to "Python List Assignment Explained: Why Does b[1] Print 20? ๐Ÿค” #python #pythonquiz"