Number similarity

Report a typo

Calculate the similarity of numerical data with the Jaccard similarity index. In this challenge, you need to find the similarity indexes of the numbers taken from two different lines. For this, receive numbers from the user as input. Print index results. The result must be a float.

Sample Input 1:

1 2 3 4
1 2 3 5

Sample Output 1:

0.6
Write a program in Python 3
def jaccard_similarity(list1, list2):
...


...
___

Create a free account to access the full topic