Post

@PythonPr Indentation between append and (4) in the second image. This will give error
English

@PythonPr big green tick next to one, big red tick next to the other. You’re welcome
English

@PythonPr Typo errors are the easiest to debug but the worst for the eye
Logical errors on the other hand are the hardest but eyes cant help there
runtime error on the other hand is many time just bad assumptions
As dyslexic i hate typo errors
here it is a space before (
English

@PythonPr Irrelevant only to the 0 & 1 matter who writes those 0, 1 ?
You don’t know? Then stop memorizing what code is supposed to do.
English

In Python, b = a doesn't create a new list; it just creates a new reference to the same list in memory.
Since lists are mutable, any change made through b is reflected in a because they both point to the exact same object. To keep a unchanged, you'd need a shallow copy like b = a.copy() or b = a[:].
The green check correctly shows that print(a) will indeed include the appended value!
English












