Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 "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
Step: 1
The image contains instructions for writing a Python function named commondata that checks if two pr...
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started