Skip to content

TypeScript code snippet – How to get match percentage of lists in python?

res = len(set(test_list1) & set(test_list2)) / float(len(set(test_list1) | set(test_list2))) * 100
  
# printing result 
print("Percentage similarity among lists is : " + str(res))
See also  TypeScript code snippet - How to insert subscript in plots in r?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.