2018-11-29から1日間の記事一覧
rev_array = reversed([0,1,2]) print([ "abcde"[idx] for idx in rev_array ]) print([ "abcde"[idx] for idx in rev_array ]) 出力: ['c', 'b', 'a'][] リスト内包ではiteratorがリセットされないのか?
rev_array = reversed([0,1,2]) print([ "abcde"[idx] for idx in rev_array ]) print([ "abcde"[idx] for idx in rev_array ]) 出力: ['c', 'b', 'a'][] リスト内包ではiteratorがリセットされないのか?