In <[EMAIL PROTECTED]>, Wensui Liu 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']].
Not by directly referencing them, but with a list comprehension:: result = [the_dict[key] for key in ('row1', 'row2', 'row3')] Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list