[Tutor] data question

Roelof Wobben rwobben at hotmail.com
Sat Oct 2 15:15:33 CEST 2010




----------------------------------------
> To: tutor at python.org
> From: alan.gauld at btinternet.com
> Date: Sat, 2 Oct 2010 14:10:25 +0100
> Subject: Re: [Tutor] data question
>
>
> "Roelof Wobben" wrote
>
>> As a test I would write a programm where a user can input game-data
>> like home-team, away-team, home-score, away-score) and makes a
>> ranking of it.
>
>> In which datatype can I put this data in.
>>
>> I thought myself of a dictonary of tuples.
>
> A dictionary would be good for the basic data but I assume there
> are more than one of these data items? If so what do they represent?
> How would they be used?
>
> We need a bit more information, even some sample datya might help.
>
> It could be a list of dictionaries or even a dictionary of
> dictionaries.
>
> Alan G.
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

Hello Alan, 

What I meant was this:
 
Let's say we have a tournament of 4 teams A,B,C,D
 
They played this games.
 
A - B  20 - 30 
C - D  23 - 67 
 
These data must be stored so I can make a module which make a ranking like this :
 
1) C   1 - 2  76 - 23 
2) B   1 - 2   30 - 20
 
I hope you know what I wan
 
 
Roelof
  		 	   		  


More information about the Tutor mailing list