- 340 名前:デフォルトの名無しさん mailto:sage [2022/07/18(月) 18:23:16.60 ID:q/MsDqBP.net]
- 内包表記の方が断然好きだな〜、mapはシンプルになる場合もあるけど
今回のようにゴチャる場合もあるんだよな〜 下記はmatomeを自分好みの関数名と変数名に改変したヤツでっす! def get_lists_items(func): ____# 内包表記版 ____def process(*lists): ________return [func(*items) for items in zip(*lists)] ____return process def get_lists_items(func): ____# map版 ____def process(*lists): ________return list(map(lambda items: func(*items), zip(*lists))) ____return process
|

|