import csv
with open("2016_pilbara.csv") as csv_file:
    reader = csv.reader(csv_file)
    for line in reader:
        print(line)

import csv
population = []

with open("2016_pilbara.csv",encoding="utf-8") as csv_file:
    reader = csv.reader(csv_file)
    for line in reader:
        #print(line)
        population.append(line)
print(population)

# for num in range(0, 10):
#   print(age_group)

for age_group in population:
    print(age_group)

for age_group in population:
    print(f"{age_group[0]}:{age_group[1]}")

with open("population.csv", mode="w", encoding="utf-8") as csv_file:
    writer = csv.writer(csv_file,delimiter=",")
    for age_group in population:
        writer.writerow([age_group[1],age_group[0]])

import csv 
colours_20_simple = []

with open("colours_20_simple.csv",encoding="utf-8") as csv_file:
    reader = csv.reader(csv_file)
    for line in reader:
        #print(line)
        colours_20_simple.append(line)
    print("colours_20_simple")


    