[Solved] Compare occurrences between str in two lists [closed]
Here is how you can use a nested for-loop with formmatted strings: list1 = [“ilovepython”,”ilovec#”] list2 = [“love”,”python”] for i in list1: # For every string in list11 print(f’in “{i}”:’) # Print the string for j in list2: # For every string in list2 num = i.count(j) # Store the number of occurrences of the … Read more