A python based average calculator which can handle single number with sequence of digits, or an tuple with nested lists and tuples and a regulate tuple with multiple digits
This Python script calculates the average of a sequence of numbers, including nested lists and tuples. It recursively processes the input to find all integers and calculates their average.
Run the avg.py
script and provide the sequence of numbers as arguments.
Example:
python avg.py 8 7 6 5 5 8 [12, 34, 56] (123, 456) [[1, 2, 3], (4, 5, 6)] ((7, 8, 9), (10, 11, 12))