intersection tag

1 questions


1 answers
81 views
0
Find the intersection of two lists

If the list is a one-dimensional array, this is how you get it.b1 = [1,2,3,4,5,9,11,15]b2 = [4,5,6,7,8]b3 = [val for val in b1 if val in b2]#ordef intersect(a, b): return list(set(a) & set(b))prin...

2 years ago

© 2024 OneMinuteCode. All rights reserved.