2
Answers

function with parameter set and list tuple value

Hi friends,
 
write a function and as set and list tuple as parameter to check list tuple key in set and print list tuple value in list
Example :
 
# set
colors = {'black','pink','yellow'}
# list tuple
list1 = [('green',100),('yellow',13),('red',6)]
 
Expected output : [13] bcoz yellow color is present in set
Thanks in advance
Answers (2)