Tuple sequence : Tuple Creation « Tuple « Python






Tuple sequence

Tuple sequence

X = 'spam'
Y = 'eggs'

print X
print Y


X, Y = Y, X

print X
print Y

           
       








Related examples in the same category

1.tuple assignmenttuple assignment
2.tuples: swaps valuestuples: swaps values
3.Tuple assigmentTuple assigment
4.Create tuple from an integerCreate tuple from an integer
5.A tuple containing an integerA tuple containing an integer