Write a python function that takes two lists and prints True if they have at least one common member.

# Write a python function that takes two lists and prints True if they have at least one common member.

def k():

    li1 = [1,2,3,4,5]

    li2 = [6,7,1,9,22]

    for i in range (len(li1)):

        if li1[i] in li2 :

            print("True")

k()

Comments

Popular posts from this blog