python: when for accesses the sequence, it modifies the sequence again and again. What's the problem

An instance Take a basic topic: PAT (Basic Level) Practice 1005: continue 3n+1 to show this problem. For a detailed description of the topic, see the PAT website. Problem solving ideas 1. After writing the input data, convert the sequence to be verified into the list num of digital elements_ list. 2. Traverse num from scratch_ List, for ea ...

Posted by joelhop on Fri, 01 Oct 2021 15:34:29 -0700