October 2018
Intermediate to advanced
214 pages
5h 31m
English
A list in Python is an ordered set of values.
Input:
# source_code/appendix_c_python/example06_list.py some_primes = [2, 3] some_primes.append(5) some_primes.append(7) print "The primes less than 10 are:", some_primes
Output:
$ python example06_list.py The primes less than 10 are: [2, 3, 5, 7]
Read now
Unlock full access