Question: Write a program (q5.py) , that takes two lists as parameters and prints True if they have at least one element in common, False otherwise.

Write a program (q5.py) , that takes two lists as parameters and prints True if they have at least one element in common, False otherwise.

For example: overlapping([1,2,3,4,5], [6,9,2]) would return True: 2 is in both lists.

overlapping((1,2,3,4,5), [6,7]) would return False: there are no common elements.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!