resolucion de problema

by BlogueroConnor on March 11th, 2010
No notes
Syntax: Python
Show lines - Hide lines - Show in textbox - Download
mi_d = {1:'a', 2:'b', 3:'c'}
mi_c = set(['a','c'])
res = []
for c in mi_c:
    for x in mi_d:
        if mi_d[x] == c:
            res.append(x)
print res

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS