On Wed, 22 Dec 2010 23:31:39 +1100, Steven D'Aprano wrote:
> In this case, you need to sum the number of races for all the fixtures:
>
> num_races = sum(len(racetimes) for racetimes in FixtureDict.values())

Many thanks Steven for your explanation and final golden nugget of code.

On Wed, 22 Dec 2010 10:11:25 -0500, bob gailer wrote:
>
> Also note: len(dict.keys()) == len(dict.values()) == len(dict)

Yup, thanks Bob.

Cheers,

G.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to