Optimization tricks in Python: lists and tuples

Python

Optimization tricks in Python: lists and tuples – Source Rushter.com

Python has two similar sequence types such as tuples and lists. The most well-known difference between them is that tuples are immutable, that is, you cannot change their size as well as their immutable objects.

You can’t changes items in a tuple:

>>> a = (1,2,3)
>>>