Amit Kumar Singh

Amit Kumar Singh

  • 381
  • 3.9k
  • 195.6k

function with parameter set and list tuple value

Apr 20 2020 6:56 AM
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)