When you call a function you must define it first, otherwise you will get an error message. But when you call a functions by another function it's okay to define a fuction after that, for example:
def repeat_name():
print_name()
print_name()
def print_name():
print('Mahmud')
repeat_name()
In this example we call print_name function in repeat_name function before its defination, and it works fine, but why does this happen?
Note: I'm a beginner in Python.