Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- k={1,2,3,4}
- v={2,3,5,6}
- spisok_mozhestv=[k,v]
- print(a)
- slovar={'mat':k,'bio':v}
- def get_key(d,value):
- for t,n in d.items():
- if n==value:
- return t
- def vivod(a):
- for i in range (0,len(a)-1):
- for j in range (1,len(a)):
- if len(a[i]&a[j])>=2:
- print(get_key(slovar,a[i]),get_key(slovar,a[j]))
- vivod(spisok_mozhestv)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement