""" Ex. 2.3 from "A primer on... Be aware of the potential confusion from using variable name p multiple times; - in the first loop, taking on the values from 2 to 13 - on its own, assigning the new value 17 - again in the second loop, taking values from 2 to 17 We could have used different names for each of these three steps, which some would find easier, but it is very natural and completely valid to just use the same variable name and update its value. """ primes = [2, 3, 5, 7, 11, 13] #iterate through the list, each element #is put in the variable p, which is printed for p in primes: print(p) #set a new value for p: p = 17 primes.append(p) #run through the loop again and print: for p in primes: print(p) """ Terminal> python primes.py 2 3 5 7 11 13 2 3 5 7 11 13 17 """