Pythonは同じ事するのにforと内包表記の2つの方法がat TECHPythonは同じ事するのにforと内包表記の2つの方法が - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト85:デフォルトの名無しさん 20/07/02 09:23:51.20 9cYvmHwP.net >>84 もう少しまともな記事を探してくれw https://impythonist.wordpress.com/2014/02/16/open-heart-with-guido-van-rosuuma-lost-interview-of-python-creator-part2/ IT’S A CATCHY PHRASE. Guido: Tim has a way with words. “There’s only one way to do it” is actually in most cases a white lie. There are many ways to do data structures. You can use tuples and lists. In many cases, it really doesn’t matter that much whether you use a tuple or a list or sometimes a dictionary. It turns out usually if you look really carefully, one solution is objectively better because it works just as well in a number of situations, and there’s one or two cases where lists just works so much better than tuples when you keep growing them. グイド:ティムは言葉に道があります。「それを行う方法は1つしかありません」は、実際にはほとんどの場合、白い嘘です。 データ構造を行うには多くの方法があります。タプルとリストを使用できます。多くの場合、タプルを使用するか、 リストを使用するか、時には辞書を使用するかは、それほど重要ではありません。よく注意して見ると、 通常は1つの解決策が客観的に優れていることがわかります。これは、多くの状況で同じように機能するためです。 リストを拡大し続けると、リストがタプルよりもはるかにうまく機能するケースが1つまたは2つあります。 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch