Question 5 Define a function overlapping () that takes two lists and returns true if they have at least one member in common, False otherwise.
Defining a function to check if two lists are overlapping
For loop which iterates from 0 to the length of ‘l1’
If at any point the elements in the list overlap, then the function returns true
Taking the length of the 2 lists and assigning it to variables len1 and len2
For loop which iterates from 0 to the length of ‘l2’
If the elements of the 2 lists don’t overlap at any point then the function returns false
Made by
Davneet Singh
Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.
Many students prefer Teachoo Black for a smooth, ad-free learning experience.
Go ad-free with Teachoo Black
Adblock detected
Skip every ad. Keep every answer.
Teachoo Black gives you a clean, uninterrupted study experience on every page.