algN/test/内置函数/test.py

12 lines
246 B
Python
Raw Normal View History

2025-08-23 10:12:26 +08:00
# key参数表示使用指定的方法来比较大小而不是使用原数据比较大小
x = (2, 3, 4, 5)
print(max(x))
print(max(x, key=lambda z: 1 / z))
############################### collections #################################