reference data in a dictionary
Wensui Liu
liuwensui at gmail.com
Wed Feb 14 15:50:21 EST 2007
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']].
thank you for reply, Ben.
wensui
On 2/14/07, Ben Finney <bignose+hates-spam at benfinney.id.au> wrote:
> "Wensui Liu" <liuwensui at gmail.com> writes:
>
> > i am new to python and have a question about referencing data in a
> > dict. is there anyway that allows me to do something like:
>
> > dict[['row1', 'row2', .....'row100']]
>
> What behaviour would you expect from that statement? If we know what
> you're trying to do, perhaps we can suggest a solution.
>
> --
> \ "Like the creators of sitcoms or junk food or package tours, |
> `\ Java's designers were consciously designing a product for |
> _o__) people not as smart as them." -- Paul Graham |
> Ben Finney
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
WenSui Liu
A lousy statistician who happens to know a little programming
(http://spaces.msn.com/statcompute/blog)
More information about the Python-list
mailing list