Lists & Tuples: Tensorflow - 23U3Aic03
Lists & Tuples: Tensorflow - 23U3Aic03
Python Tuple is a collection of Python Programming objects much like a list. The
sequence of values stored in a tuple can be of any type, and they are indexed by integers.
Values of a tuple are syntactically separated by ‘commas‘. Although it is not necessary, it is
more common to define a tuple by closing the sequence of values in parentheses. This helps in
understanding the Python tuples more easily.
Creating a Tuple
In Python Programming, tuples are created by placing a sequence of values separated
by ‘comma’ with or without the use of parentheses for grouping the data sequence.
Example:
Tuple1 = ('Geeks', 'For')
print("\nTuple with the use of String: ")
print(Tuple1)