Re: [Tutor] Help with a Dictionary

2010-01-11 Thread Garry Bettle
Many thanks to Alan Gauld, Gerard Flanagan, Lie Ryan and spir for your replies. All systems are go! Cheers, Garry ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help with a Dictionary

2010-01-08 Thread spir
Garry Bettle dixit: > for fixture in FixtureList: > print fixture.ljust(6), FixtureList[fixture] ... > for fixture, racetimes in FixtureList: > print fixture, racetimes > > Traceback (most recent call last): > File "", line 1, in > for fixture, racetimes in FixtureList: > ValueErro

Re: [Tutor] Help with a Dictionary

2010-01-08 Thread spir
Garry Bettle dixit: [...series of data with same format...] > 2010-01-07 1437 Crayfd H3 380m > ... etc. > > The above are RaceDate + RaceTime + Fixture + RaceDetails, and are > output in RaceTime order. > > What I'd like to do, is output a transposed-like summary of just the > Fixture + RaceTime

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Lie Ryan
On 1/8/2010 3:12 AM, Garry Bettle wrote: This is what I've come up with. Sorry, python is something I touch on occasionally: must do more! As the races are output, I build a dictionary of key=FixtureName and value=RaceTimes: RaceTime = marketResp.market.displayTime.time() cRaceTime = RaceTime

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Gerard Flanagan
Garry Bettle wrote: Howdy all, I hope this message finds you all well. I have a list that I output in the following order: 2010-01-07 1103 Sund A7 450m 2010-01-07 Sheff A7 500m 2010-01-07 1119 Sund A6 450m 2010-01-07 1128 Sheff A6 500m 2010-01-07 1134 Sund A5 450m 2010-01-07 1142 Sheff A7

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Alan Gauld
"Garry Bettle" wrote What I'd like to do, is output a transposed-like summary of just the Fixture + RaceTime. Sund 1103 1119 1134 1148 1204 1218 1232 1247 1304 1319 1333 1351 Sheff 1128 1142 1157 1212 1227 1242 1258 1312 1327 1344 1403 As the races are output, I build a dictionary of k

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Garry Bettle
On Thu, Jan 7, 2010 at 15:26, Garry Bettle wrote: > > Howdy all, > > I hope this message finds you all well. > > I have a list that I output in the following order: > > 2010-01-07 1103 Sund A7 450m > 2010-01-07 Sheff A7 500m > 2010-01-07 1119 Sund A6 450m > 2010-01-07 1128 Sheff A6 500m > 201

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Benno Lang
On Thu, Jan 7, 2010 at 10:51 PM, Garry Bettle wrote: > I have a list that I output in the following order: > > 2010-01-07 1103 Sund A7 450m > 2010-01-07 Sheff A7 500m > 2010-01-07 1119 Sund A6 450m > 2010-01-07 1128 Sheff A6 500m > 2010-01-07 1134 Sund A5 450m > 2010-01-07 1142 Sheff A7 500m

[Tutor] Help with a Dictionary

2010-01-07 Thread Garry Bettle
Howdy all, I hope this message finds you all well. I have a list that I output in the following order: 2010-01-07 1103 Sund A7 450m 2010-01-07 Sheff A7 500m 2010-01-07 1119 Sund A6 450m 2010-01-07 1128 Sheff A6 500m 2010-01-07 1134 Sund A5 450m 2010-01-07 1142 Sheff A7 500m 2010-01-07 1148