from tabulate import tabulate import sys import os if len(sys.argv) < 2: sys.exit("Too few Command-line argument") elif len(sys.argv) > 2 : sys.exit("Too many Command-line argument") elif ".csv" not in sys.argv[1]: sys.exit("Not a csv file") elif not os.path.exists(sys.argv[1]): sys.exit("File not found") with open(sys.argv[1]) as file: table=[] for line in file: typ , small , large = line.split(",") list = [typ,small,large] table.append(list) print(tabulate(table, headers = "firstrow" , tablefmt="grid") ) what is wrong with this code, it works pretty fine for me, but still there is that :-
:( pizza.py renders prices from sicilian.csv expected "+-------------...", not "+-------------..." :( pizza.py renders prices from regular.csv expected "+-------------...", not "+-------------..."