reference data in a dictionary

Duncan Booth duncan.booth at invalid.invalid
Thu Feb 15 14:21:31 EST 2007


"Wensui Liu" <liuwensui at gmail.com> wrote:

> I know dict['row1'] will always work. but it will only get 1 row out
> of the dict. is there anyway i can get multiple (>1) rows out of dict
> by directly refeencing them, something like dict[['row1', 'row2']].
> 
[d[x] for x in ('row1', 'row2')]



More information about the Python-list mailing list