How to create Tuples in python?

#Creating tuples
t=()
#1st method to declare tuple
t="Apple","Ball" 
print(t)

#2nd method to declare tuple
t=("Apple","Ball")
print(t)

Output of above program 1st mothod

('Apple', 'Ball')

Output of above program 2nd method

('Apple', 'Ball')

Leave a Reply