Koay Yong Cett

Jul 11, 2020

7 min read

[012] Introduction to Python Basics: Tuples and Sets

Photo by Chris Bayer on Unsplash

There is another data structure that is known as tuple. A tuples are similar to lists but unlike list we cannot modify the them where they are immutable.

We already have lists so why do we have to learn tuple as you know it is pretty similar to list and the only differences is tuple is immutable?

Tuple Methods:

source: https://www.w3schools.com/python/python_ref_tuple.asp

Remember that the tuples are simply lists that are immutable.

Sets:

Sets are simply unordered collections of unique objects and let’s have a look.

Set methods:

source: https://www.w3schools.com/python/python_ref_set.asp

Thanks for reading my stories 😃