#tuples and lists are the same thing, but a tuple cannot be changed
tup = (1,'string',True)
lst = ['hiya',23545,None]
# compare the size
import sys
my_list = [0, 1, 2, "hello", True]
my_tuple = (0, 1, 2, "hello", True)
print(sys.getsizeof(my_list), "bytes")
print(sys.getsizeof(my_tuple), "bytes")
# compare the execution time of a list vs. tuple creation statement
import timeit
print(timeit.timeit(stmt="[0, 1, 2, 3, 4, 5]", number=1000000))
print(timeit.timeit(stmt="(0, 1, 2, 3, 4, 5)", number=1000000))
# A tuple might contain data about a person (heterogeneous type mixture)
person_a = (name, age, occupation, address)
# A list might contain a list of people (homogeneous type mixture - all tuples!)
people = [person_a, person_b, person_c]