home changes contents help options

177:最大値 最小値を求める

 >>> a=[1,2,3]
 >>> a
 [1, 2, 3]
 >>> max(a)
 3
 >>> min(a)
 1

 >>> a=['apple','orange','peach']
 >>> max(a)
 'peach'
 >>> min(a)
 'apple'