Evaluating,
max_val = max(a)
will cause the error,
ValueError: max() arg is an empty sequence
Is there a bett
Can create simple lambda to do this:
get_max = lambda val_list: max([ val for val in val_list if val is not None ]) if val_list else None
You can call it this way: get_max(your_list)
get_max(your_list)