En Thu, 08 Mar 2007 05:20:20 -0300, Alexander Eisenhuth  
<[EMAIL PROTECTED]> escribió:

> what algo do you use, when you want to find the dict values from d, with  
> members
> of l. Following example:
>
>  >>> d = {1:2,2:3,3:4,4:5,5:6,6:7,7:8,8:9,9:10}
>  >>> l = [7,8]
>  >>> found_dic_members = <yourCode>
>  >>> print found_dict_members
> [8,9]

found_dic_members = [d[key] for key in l]


-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to