You have no objects. You have only got functions, and the max_value
name is a local variable.
You do return a tuple of both min_value
and max_value
, but you ignore that return. Use tuple assignment to capture both:
for line in opened_function_file:
min_value, max_value = compute_min_and_max(line)
global_max = max(max_value, global_max)
global_min = min(min_value, global_min)