python tuple vs lsit code example
Example 1: python tuple vs list
#tuples and lists are the same thing, but a tuple cannot be changed
tup = (1,'string',True)
lst = ['hiya',23545,None]
Example 2: python tuple and list time compare
import timeit
print(timeit.timeit('x=(1,2,3,4,5,6,7,8,9)', number=100000))
print(timeit.timeit('x=[1,2,3,4,5,6,7,8,9]', number=100000))