Here is the start of my file:
print("Welcome to Ebs Corp.")
print('Please browse my shopping list\n')
with open('./Catalouge2.csv', 'r') as ebsfile:
products = []
for line in ebsfile:
products.append(line.strip().split(','))
for item in products:
print('{} {} £{}'.format(item[0],item[1],item[2]))
My csv file is:
12345678,Blue-Eyes White Dragon,5.60
87654321,Dark Magician,3.20
24681012,Toon Blue-Eyes White Dragon,2.00
10357911,Toon Dark Magician,3.00
54626786,Duel Mat,4.30
85395634,Deck Box,2.50
78563412,Pot of Greed,10.50
I want it to be able to add a header for each items. For the numbers at the start I want it to have 'GTIN' then 'Description' and then 'Price' and I would like them to be in line. Thanks
I want it to look like
GTIN---------------Description-----------------Price
12345678-----------Blue-Eyes White Dragon------5.60
87654321-----------Dark Magician---------------3.20
Here is an example but without all the loops http://pastebin.com/7GepdJSu