fork download
  1. # your code goes here
  2. d ={1:'a',2:'a',3:'c'}
  3. print(d.values())
  4. own=[]
  5. for k, v in d.items():
  6. if v == 'a':
  7. own.append(k)
  8. print(own)
Success #stdin #stdout 0.02s 9204KB
stdin
Standard input is empty
stdout
dict_values(['a', 'a', 'c'])
[1, 2]