Sitemap
May 11, 2021

The assignment operator in python does not copy the content of the list it just create a reference for the list.

here b is just a second name of a.

if you want to copy the list a to b then use b=a.copy() otherwise it will always creates a new variable with reference of a.

--

Abhay Parashar
Abhay Parashar

Written by Abhay Parashar

A curious mind exploring the intersection of tech, cybersec, and storytelling. Writing about what I learn, one post at a time.