Discussion Forum | Board Infinity

What is the difference between List, Tuple and Sets

Lists, Tuple and Sets.

list: A list is a collection which is ordered and changeable. In Python lists are written with square brackets.
ref:https://www.w3schools.com/python/python_lists.asp
tuples: A tuple is a collection which is ordered and unchangeable . In Python tuples are written with round brackets.
ref:https://www.w3schools.com/python/python_tuples.asp
set:A set is a collection which is unordered and unindexed. In Python sets are written with curly
brackets.
ref:https://www.w3schools.com/python/python_sets.asp