Re: [Tutor] Print items from 3 lists in order

2012-10-21 Thread Alan Gauld
On 22/10/12 01:09, Dave Angel wrote: I tried: for x in zip(a, b, c): print x But that gives: ('Ron', '25th oct', 'Charms') ('Harry', '27th oct', 'DADA') ('Hermoine', '29th oct', 'Potions') ??? So all you have now is a formatting problem. Very good; you're close. instead of z, just use

Re: [Tutor] Print items from 3 lists in order

2012-10-21 Thread Dave Angel
On 10/21/2012 08:01 PM, Saad Javed wrote: > Hi, > a = ['Ron', 'Harry', 'Hermoine'] > b = ['25th oct', '27th oct', '29th oct'] > c = ['Charms', 'DADA', 'Potions'] > I want to print like this: > Ron - 25th oct > Charms > Harry - 27th oct > DADA > Hermoine - 29th oct > Potions > > The items in each li

[Tutor] Print items from 3 lists in order

2012-10-21 Thread Saad Javed
Hi, a = ['Ron', 'Harry', 'Hermoine'] b = ['25th oct', '27th oct', '29th oct'] c = ['Charms', 'DADA', 'Potions'] I want to print like this: Ron - 25th oct Charms Harry - 27th oct DADA Hermoine - 29th oct Potions The items in each list are populated dynamically so I don't know how many items will be