How cn you say that tuple is an ordered list of objects.
Answers
Answer:
because tuples don't contain lists, strings or numbers. They contain references to other objects. The inability to change the sequence of references a tuple contains doesn't mean that you can't mutate the objects associated with those references.
Answer:
Introduction to Python 3
Lists and Tuples in Python
by John Sturtz 17 Comments basics python
Tweet Share Email
Table of Contents
Python Lists
Lists Are Ordered
Lists Can Contain Arbitrary Objects
List Elements Can Be Accessed by Index
Lists Can Be Nested
Lists Are Mutable
Lists Are Dynamic
Python Tuples
Defining and Using Tuples
Tuple Assignment, Packing, and Unpacking
Conclusion
Watch Now This tutorial has a related video course created by the Real Python team. Watch it together with the written tutorial to deepen your understanding: Lists and Tuples in Python
Lists and tuples are arguably Python’s most versatile, useful data types. You will find them in virtually every nontrivial Python program.
Here’s what you’ll learn in this tutorial: You’ll cover the important characteristics of lists and tuples. You’ll learn how to define them and how to manipulate them. When you’re finished, you should have a good feel for when and how to use these object types in a Python program.