GTXY20 wrote: > Hi There, > > For some reason I am getting no results and if I alter the code to relect: > > > inp = open('input.txt') > > for line in inp: > fields = line.split(",") > ProdId = fields[0] > products = fields[1:] > for product in products: > print('%s\t%s\n' % (ProdId, Product))
Names are case-sensitive in Python; product and Product are not the same. > > I am left with an error indicating that product is not defined In the future when you get an error, please copy and paste the entire error message, including the traceback, into your email. Also, please use Reply All to reply to the list. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor