Creating and Amending Lists
July 04, 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
- The Rise of Agents in Agentic Coding: Transforming Software Development August 20, 2025
- Bleu de Chanel L'Exclusif August 19, 2025
- CSS Optimization August 19, 2025