Python tupple code example

Example 1: pyhton tuple

#It's like a list, but unchangeable
tup = ("var1","var2","var3")
tup = (1,2,3)
#Error

Example 2: tuples in python

# the tuples are like the Read-Only they are not to be changed or modified they're constant

letters = "a", "b", "c", "d"    # you can use () as they are optional
print(letters)
"""
    tuples are immutable but it's important because they don't returns the bugs
    
    these are sequence types means you can iterate over them by it's index numbers
    
    tuples data can't be changed but list's data can be changed
"""

Tags:

C Example