[Solved] Python, How to find the min and max of a variable used in programme , without using if statment.?


This worked for me:
Create empty List pr
append new price every minute to list
When done , find min,max of List

pr=[] ‘create empty list
pr.append(price) ‘add price every minute or so
min(pr),max(pr) ‘get min,max of the list

This works, is there a shorter way?
Better to use List or array?
Thanks

solved Python, How to find the min and max of a variable used in programme , without using if statment.?