rdr-py / code / common_data.py
common_data.py
Raw
"""
*******************************************************
Owner: Ashutosh Jha
For: APPCAIR BITS Pilani Goa Campus, Reflexis Systems
Function Name: common_data
Takes two lists as input and returns true or false 
depending on whether there is a common element or not.
*******************************************************
"""
def common_data(list1, list2): 
    result = False
    for x in list1:
        for y in list2:  
            if x == y: 
                result = True
                return result  
    return result