Ad
Code
Diff
  • def common_substring(string, sub_str):
        value = sub_str in string
        return value
    • from re import search
    • def common_substring(string, sub_str):
    • if search(sub_str, string):
    • return True
    • return False
    • value = sub_str in string
    • return value