Perl 中有一个非常有用的功能样式列表操作List::Util , List::MoreUtils。Python有类似物吗?我对uniq、reduce、any、all和none特别感兴趣。
提到的模块提供功能:
- 第一个 max maxstr min minstr 减少 shuffle sum
- 任何 所有 无 notall true false firstidx first_index lastidx last_index insert_after insert_after_string 在 after_incl 之后应用索引 before_incl firstval first_value lastval last_value each_array each_arrayref pairwise natatime mesh zip uniq distinct minmax part