A mixed-up function

Report a typo

Take a look a the function below. The order is mixed up. Sort the code to make it run. When sorting, you should first calculate the union.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                union = set_1.union(set_2)
              
                set_1 = set(list_1)
              
                return len(intersection) / len(union)
              
                intersection = set_1.intersection(set_2)
              
                def jaccard_similarity(list_1, list_2):
              
                set_2 = set(list_2)
              
___

Create a free account to access the full topic