Return max difference between any two elements in a list. Example: [2,7,1,9] => 8
Implement this function:
def max_difference(lst: list) -> int:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: lst.
Input
[2, 7, 1, 9]
Output
8