Advertisement
here2share

# if_substrings_in_list_a_in_list_b.py

Sep 8th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.10 KB | None | 0 0
  1. # if_substrings_in_list_a_in_list_b.py
  2.  
  3. a = [2,3,4,6,7]
  4. b = [1,2,5,6,9]
  5. print [i for i in a if i in b]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement