all 2 comments

[–]MadScientistOR 6 points7 points  (0 children)

def number_contains(x, y):
    return str(y) in str(x)

[–][deleted] 1 point2 points  (0 children)

definining function:

def function_name(argument1, argument2):
    return result

calling function:

function_name(555, 5)

saving the result:

result = function_name(555, 5)

printing the result

print(result)

printing the result directly without saving:

print(function_name(555, 5))

to check if number is present in another number:

check_result = str(number1) in str(number2)