• importing modules

Question related to mission The Most Numbers

 

Hello,

As far as I'm concerned this is a valid code altough I cannot import modules into functions:

from decimal import *
getcontext().prec=3
def checkio(*args):

    if args:
        result = Decimal(max(*args)) - Decimal(min(*args))
    else:
        return 0

    return result

Also tried with round() but it's just less effective. Please let me know if you consider this valid or should I find another solution.