fork download
  1. a = [('when', 3), ('why', 4), ('throw', 9), ('send', 15), ('you', 1)]
  2.  
  3. b = ['the', 'when', 'send', 'we', 'us']
  4.  
  5. c=[]
  6.  
  7. for x in a:
  8. if x[0] not in b:
  9. c.append(x)
  10.  
  11. print c
  12.  
Success #stdin #stdout 0.01s 7728KB
stdin
Standard input is empty
stdout
[('why', 4), ('throw', 9), ('you', 1)]