@dec_sub
def sub(a, b):
c= a-b
return c
def dec_sub(func):
def wrapper(a, b):
if a<b:
a, b = b, a
return func(a, b)
return wrapper
print(sub(48, 9)) # first digit is bigger than the second one yields positive return
print(sub(1, 8)) # second digit is bigger than the first one also yields positive return
#Output : 39
7
In the above code, how to use the function 'sub' in a usual way without the influence of the decorator?