1、
>>> a = [34,28,187,22,128]
>>> max = a[0]
>>> for i in a: ## 求最大值
if i > max:
max = i
>>> print(max)
187
>>> min = a[0]
>>> for i in a: ## 求最小值
if i < min:
min = i
>>> print(min)
22
1、
>>> a = [34,28,187,22,128]
>>> max = a[0]
>>> for i in a: ## 求最大值
if i > max:
max = i
>>> print(max)
187
>>> min = a[0]
>>> for i in a: ## 求最小值
if i < min:
min = i
>>> print(min)
22