Write a Python function that takes two lists and returns True if they have at least one common member.
Notes:
- Define a function which will accept two list parameters.
- Function should return True if both list contains at least one common element.
- Return False if no common element found.
Instructions:
-
Program should be written in file build.py
-
Function name should be solution.
-
Input
Type: List Value: Case-I --> a = [1,2,3,4,5] b = [5,6,7,8] Case-II --> a = [1,2,3,4] b = [5,6,7,8]
-
Expected Output
Type: Boolean Value: True for Case-I and False for Case-II