A tuple consists of a number of values separated by commas : Tuple Declaration « Tuple « Python






A tuple consists of a number of values separated by commas

A tuple consists of a number of values separated by commas

t = 12345, 54321, 'hello!'
print t[0]

print t


           
       








Related examples in the same category

1.Create an empty tuple
2.Empty tuples are constructed by an empty pair of parenthesesEmpty tuples are constructed by an empty pair of parentheses
3.A tuple with one item: a comma A tuple with one item: a comma