Python Introducing Lists Using Lists Review Mutability

Michael Akamihe
Michael Akamihe
767 Points

Reinforce

Isn't taco_joints.copy() a copy of a copy. Does that mean that taco_joints can be iterated on with no unexpected results?

1 Answer

Josh Keenan
Josh Keenan
17,329 Points

It means that no matter what you do the original list will stay the same and not be affected by any operations you carry out. So you can iterate over it without changing anything of the original copy.