import csv html_output = '' names = [] with open('patrons.csv', 'r') as data_file: csv_data = csv.DictReader(data_file) # We don't want first line of bad data next(csv_data) for line in csv_data: if line['FirstName'] == 'No Reward': break names.append(f"{line['FirstName']} {line['LastName']}") html_output += f'

There are currently {len(names)} public contributors. Thank You!

' html_output += '\n' print(html_output)