Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. def get_key1(d, value): # d - имя словаря, value - значение, ключ которого надо определить
  2. for t, n in d.items():
  3. if n == value:
  4. return t # ключ, в нашем случае название предмета
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement