Tuples Dictionaries
No account is required. Learn the material, try the examples, and mark it complete locally when you are ready to move on.
Tuples
Tuples is a sequence data type as well. We can keep different elements inside tuples. Tuples are a combination of different elements separated by a comma.
Tuples are also like a list but with a change that we can not change indivudual values inside a tuple. We can reference those individual elements though.
That makes a tuple immutable. Lists are mutable. Mutable means, we can change the individual elements.
tuple1 = 1, 2, "third element", Truetuple1(1, 2, 'third element', True)You might have noticed that list uses square brackets to store elements. Tuples uses round brackets to store elements. Just don't be confused as of now with these bracket notations.