If you are not assigning a return() to the function you define, python automatically assumes the output as None. You might want to see it here.
If you have a function that takes in a specific number of arguments and you call that function with fewer or more variables, then you will see the following error:
TypeError: function() takes 2 positional arguments but 3 were given
If you call your function() with a typo in its name, then you will see the following error.
NameError: name 'funciton' is not defined
If you define a function that can handle as many inputs as you give, you need to make sure that your function can process that information.
This redefinition may delete your global variables or reset their values. However, this is done in the initiation of a class usually.
Local variables are the ones that are defined temporarily and are discarded when that environment is closed. This environment can be loops or functions.
If you define a variable inside a local environment, you cannot call or use that variable directly globally. However, you can define global variables inside the loops.