Using Dictionary

Pippo adm2303.2304 at gmail.com
Tue Apr 14 10:28:19 EDT 2015


On Tuesday, 14 April 2015 09:54:46 UTC-4, Michiel Overtoom  wrote:
> On Apr 14, 2015, at 15:34, Pippo wrote:
> 
> > How can I use dictionary to save the following information?
> 
> What a curious question. The purpose of a dictionary is not to save information, but to store data as a key -> value mapping:
> 
>     telbook = {}
>     telbook["jan"] = "0627832873"
>     telbook["mary"] = "050-932390"
> 
> Or do you mean 'store' when you mention 'save'?
> 
> ...and to store a bunch of lines you don't need a dictionary either. A list would do:
> 
> info = [
>     "#C[Health]",
>     "#P[Information]",
>     "#ST[genetic information]",
>     ]
> 
> Greetings,
> 
> -- 
> "You can't actually make computers run faster, you can only make them do less." - RiderOfGiraffes

Thanks. I wanted to store them. 



More information about the Python-list mailing list