For loop on list

Input:

source_code/appendix_c_python/example11_for_loop_list.py
primes = [2, 3, 5, 7, 11, 13]
print 'The first', len(primes), 'primes are:'
for prime in primes:
        print prime

Output:

$ python example11_for_loop_list.py 
The first 6 primes are:
2
3
5
7
11
13
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset