max可以这样用的,你拼错变量名了。
>>> a = [2,3,4,5,6,7]
>>> max(a)
7
numbers= [2,3,4,5,6,7] #你写的变量名是nubmers
max(numbers) #变量名错了,当然没法用
max(...)
max(iterable[, key=func]) -> value
max(a, b, c, ...[, key=func]) -> value
With a single iterable argument, return its largest item.
With two or more arguments, return the largest argument.
max函数的可以传入list, tuple, 以及多个参数
>>> max([2,3,4,5,6,7])
7
>>> max(2,3,4,5,6,7)
7
拼写错误nubmers