Anyway to clarify this code? (dictionaries)

bonono at gmail.com bonono at gmail.com
Wed Nov 23 04:50:12 CET 2005


Mike Meyer wrote:
> def my_search(another, keys, x):
>      new = dict()
>      for k in keys:
>          if another[k] >= x:
>             new[k] = another[k]
>      return new
> 
BTW, this would raise exception if k is not in another.




More information about the Python-list mailing list