Tuesday, 20 August 2013

How to store multiple values together in python?

How to store multiple values together in python?

I have written a python code, to count the number of queries, and the
number of advertisements from log.
For example (google, 16, 35) where google means query, 16 means query
number, 35 means advertisement number.
I thought about defining two dictionaries, one dict is store
query->query_number, another query->advertisement, then join these 2
dicts.
But it seems too complex, is it possible to store query, query_num,
advertisement_num in a single dictionary?

No comments:

Post a Comment