Python > Tuples versus Lists
参考1
@ Introducing Python: Modern Computing in Simple Packages by Bill Lubanovic
(No. 1466 / 12833)
..., but they have many fewer functions -- there is no append(), insert(), and so on -- because they can't be modified after creation.
listと比べてtupleを使う理由が記載されている。
- Tuples use less space.
- You can't clobber tuple items by mistake.
- You can use tuples as dictionary keys
- Named tuples can be a simple alternative to objects.
- Function arguments are passed as tuples.
Named tuplesの例は以下。
http://stackoverflow.com/questions/2970608/what-are-named-tuples-in-python
Function argumentsへのtuples渡しは別途。
参考2
tupleとlistの違いについて
http://stackoverflow.com/questions/626759/whats-the-difference-between-lists-and-tuples
Tuples have structure, lists have order.
など。
Author And Source
この問題について(Python > Tuples versus Lists), 我々は、より多くの情報をここで見つけました https://qiita.com/7of9/items/6a15cc5d0badb58c7fd9著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .