From Poe Saga ,Saga 会告诉你“The elements are ordered from largest to smallest”。

From Python doc ,但是 Python doc 并没有。


From Poe Saga ,Saga 会告诉你“The elements are ordered from largest to smallest”。

From Python doc ,但是 Python doc 并没有。

1 shyrock May 23, 2023 POE saga 是个 gpt 机器人? |
2 JasonLaw OP @shyrock #1 对 https://poe.com/Sage |
3 NessajCN May 23, 2023 说了啊 equivalent to : sorted(iterable,key=key,reverse=True)[:n] |
4 CLMan May 23, 2023 Python 的文档是我遇到过的编程语言里面最难读的。 主要是因为没有明确的类型约束,很多参数没法第一时间看懂。其次是一个方法 /函数通常是多个功能的复合,通过参数来进行区分,导致需要大量的文本来解释不同参数时的功能。 |
5 JasonLaw OP @NessajCN #3 是我没看清楚,不过 returns a list with the `n` largest elements from the iterable. The elements are ordered from largest to smallest.明显更加好,因为相关的东西都放在一起了。 |
6 icatme May 23, 2023 via Android 默认有个 reverse=True 吧 |