Question: Write a Python function common data that takes two lists as arguments and returns True if they have at least one common element, otherwise

 Write a Python function common data that takes two lists as arguments and returns   

Write a Python function common data that takes two lists as arguments and returns "True" if they have at least one common element, otherwise "False". Hint: use nested loops. For example, if we have the two lists: list1= [1,2,3,4,5]; list2= [5,6,7,8,9] and we called the function (common data(list1, list2), then the returned value will be "True".

Step by Step Solution

3.50 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The image contains instructions for writing a Python function named commondata that checks if two pr... View full answer

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 Programming Questions!