#!/usr/bin/env python3 import sys import csv """ Strip unneeded data from world cities database. https://simplemaps.com/data/world-cities """ with open(sys.argv[2], "w") as outfile: with open(sys.argv[1]) as infile: reader = csv.reader(infile, quotechar='"') next(reader) # skip header for row in reader: outfile.write(f"{row[2]}, {row[3]}\n")