I'm new to python, and I'm making a program for a friend. I was wondering if it's possible to call a function in another function, for example like this:
def hundredsCheck():
if till.hundreds > 0:
till.hundreds -= 1
total -= 100
deposit.hundreds += 1
deposit.total += 100
return
else:
fiftiesCheck()
return
In this case, fiftiesCheck() is a function that is defined just below hundredsCheck(), and follows a much similar format. I have two classes as well, till and deposit, and they just contain values like the ones used in the example I listed.
I'm doing this to save space in a tiered if statement that takes up a lot of room, so this would be far simpler. If this is a viable method, then please say so, along with any other advice you may have.