def statistics(*args):
    """
    Compute the average, minimum and maximum of a list of numbers.
    Input: a variable no of arguments (numbers).
    Output: tuple (average, min, max).
    """
    # this function takes variable argument lists
    avg = 0;  n = 0 # avg and n are local variables
    for term in args:
        n = n + 1; avg = avg + term
    avg = avg / float(n)
    min = args[0]; max = args[0]
    for term in args:
        if term < min: min = term
        if term > max: max = term
    return [avg, min, max]