Estimated reading time: 1 minute
How to use python Tuples is very similar to Python Lists on our YouTube channel. Like lists tuples can store data. The significant difference is that you cannot change tuples at all; they are “Immutable”. The importance of this when using Tuples is it could impact how you structure your code, especially if you are trying to pass values within it.
Some things to consider in order to understand regards tuples:
(A)When you are using them are enclosed within (), lists have []
(B) There is no ability to change them.
(C) As they cannot be changed and can be considered static data holders, you could use them as a lookup. An example could be something that can only have a set amount of values associated with it.
Below is our list for Tuples from our YouTube channel, if you like what we do, please subscribe! Regular updates to all our lists shall be happening, so subscribing an excellent way to keep in touch 🙂
Thanks!
Data Analytics Ireland