def some_func(first_arg, second_arg, thrid_arg):
if not first_arg:
return
if second_arg != 'someting':
return
if thrid_arg < 5:
return
print(first_arg, second_arg, thrid_arg)
if __name__ == '__main__':
some_func(1, 'someting', 6) # 1 someting 6
some_func(1, 'someting', 3) # Ничего
What is an early return?https://dev.to/jpswade/return-early-12o5
An early return, or “return early” is an approach to keep readability in functions and methods.
It is always considered a wise choice to return early if simple conditions apply that can be checked at the beginning of a method.