tuple week 1
# Program to demonstrate Tuple in Python
print("=== Tuple ===")
# Creating a tuple
colors = ("Red", "Green", "Blue")
# Printing the whole tuple
print("Tuple:", colors)
# Accessing element using index
# Index starts from 0 in Python
print("First color:", colors[0])
Comments
Post a Comment