Ad
Code
Diff
  • 
    from operator import contains as common_substring
    def common_substring(string, sub_str):
        # Write your code here
        if sub_str in string:
            return True
        else:
            return False
    • from operator import contains as common_substring
    • from operator import contains as common_substring
    • def common_substring(string, sub_str):
    • # Write your code here
    • if sub_str in string:
    • return True
    • else:
    • return False