You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 satır
246B

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