I have a 2 lists and the input looks like list1=["car", "boat", "sun", "ride"] and list2=["car_1", "car_2", sun_3"]. My expected output should be like output=["boat", "ride"].
My code snippet for your reference:
For i in list1:
If any( i in e for e in list2):
Print (i)
My code is not looping through the list1. Please Correct me what i am missing.