2020-12-01から1日間の記事一覧
高階関数 functools.reduce(function, sequence, initial=None) は、 リストの存在チェック in Iterable の代用に書けますが、 わざわざ in Iterable の代わりに以下のように書くことはありません。 from functools import reduce list = ['a','b','c','d','…
高階関数 functools.reduce(function, sequence, initial=None) は、 リストの存在チェック in Iterable の代用に書けますが、 わざわざ in Iterable の代わりに以下のように書くことはありません。 from functools import reduce list = ['a','b','c','d','…