Creating and Amending Lists
July 4, 2018
A quick example that loops through a predefined list of colours and creates an additional empty list to which a ranger of numbers are added and then printed out.
colors = ['red','blue','green']
assets = []
for colors in colors:
print "The colours are: %s" % colors
for n in range(1, 10):
assets.append(n)
for n in assets:
print "The number is now: %d" % n
Recent Entries
- NSA Got Mythos Anyway April 20, 2026
- Seventy Thousand Hours of Stalemate April 20, 2026
- Ginny Danbury, 1989 April 19, 2026