Why does appending inside `range(len(L))` terminate while appending over L itself loops forever, and how does extend differ from append?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
range(len(L))Start from values = [1, 2, 3, 4]. Loop over range(len(values)) and, on each pass, append the loop variable to values. Then assign the final contents of values to final_list.
This loop is safe to run — but try to predict how many passes it makes first.