, 4, 5, 6, 7, 8, 9, 0]
[1, 2, 33, 44, 5, 6, 7, 8, 9, 0]
[1, 2, 5, 6, 7, 8, 9, 0]
[]
关键字 in
通过关键字 in 检查列表中是否包含指定元素...,返回 bool 值
not in 则是取反
# in、not in
a = [1, 2, True, {"name": "小菠萝"}, ["how", "hi"]]
print(1 in a)
print...a = ["a", "b", 1]
print(max(a))
# 输出结果
print(max(a))
TypeError: '>' not supported between instances...传多个参数的栗子
上面的栗子都是给 max 函数传递了单个参数
print(max(1, 2, 3))
print(max([1, 2], [1, 2, 3]))
# 输出结果
3
[1, 2, 3]
会返回最大的那一个参数值...The
default keyword-only argument specifies an object to return if
the provided iterable is empty