×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: Matthew J_
Added: Jun 23, 2022 12:42 PM
Views: 0
Tags: no tags
  1. def compare_lists(lst1=[], lst2=[]):
  2.     lst1_set = set(lst1)
  3.     lst2_set = set(lst2)
  4.     set_intersection = lst1_set.intersection(lst2_set)
  5.  
  6.     return len(set_intersection)
  7.