[Ian Kelly] > Which is O(n). If that is too verbose, you could also use a dictionary: >> def invert(p): > return dict(map(reversed, enumerate(p))) def inv(p): return dict(zip(p, itertools.count())) Raymond
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル