Default Arguments in Python
In this post, you will learn how to work with default arguments so that you can use that same knowledge and thus evolve.
- default arguments are intended to use their default value when the user does not send any value for that argument.
def doorState(state = True): if state: print('The door is open.') else: print('The door is closed.') doorState(False) # The door is closed.