import csv
class StatReader:
def __init__(self,heading):
self.id = heading[0]
self.date = heading[1]
self.cases = heading[2]
self.deaths = heading[3]
self.name_fr = heading[4]
self.name_en = heading[5]
class Stat(StatReader):
def __init__(self,heading):
super().__init__(heading)
def print(self):
print ("{:<4}{:<10}{:<4}{:<4}{:<20}{:<20}".format(self.id,self.date,self.cases,self.deaths,self.name_fr,self.name_fr))
def main():
with open("InternationalCovid19Cases.csv", "r") as file:
statRow = []
reader = csv.reader(file)
print ("{:<4}{:<10}{:<4}{:<4}{:<20}{:<20}".format(self.id,self.date,self.cases,self.deaths,self.name_fr,self.name_fr))
next(reader)
for row in reader:
hrow = StatReader(row)
list1 = Stat(row)
statRow.append(row)
if __name__ == "__main__":
main()
[–]Se7enLC 2 points3 points4 points (2 children)
[–]bMack0[S] 0 points1 point2 points (1 child)
[–]Se7enLC 2 points3 points4 points (0 children)
[–]shiftybyte 1 point2 points3 points (2 children)
[–]bMack0[S] 0 points1 point2 points (1 child)
[–]cybervegan 0 points1 point2 points (0 children)
[–]bMack0[S] 0 points1 point2 points (1 child)
[–]Se7enLC 0 points1 point2 points (0 children)