[Solved] Python trying to clear and reuse list [duplicate]
[ad_1] You should write inbracket = list(newstrlist); for the assignment, otherwise your lists will be pointers to the same actual element, and modifying newstrlist will modify inbracket. 3 [ad_2] solved Python trying to clear and reuse list [duplicate]