"text": " Sometimes when we do for loop, we need an index. Let's say I'm iterating a list and I need a variable there which tells me which element is there, which index of the list is running. I told ...
enumerate() は「番号も一緒に欲しい」を自然に書ける道具 Pythonでリストを for で回すのに慣れてくると、次に出てくる悩みが「いま何番目?」というやつ。 たとえば買い物リストを表示するとき、ただ品名が並ぶより「1. 牛乳」「2. 卵」みたいに番号が付いて ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する