Write a Python Program to Create Different Types of Tuples and print them. This Python example shows the creation of integer, string, boolean, float, mixed tuple, tuple inside a tuple (nested tuple), and list tuple.
# Different Type Tuples numericTuple = (10, 20, 30, 40, 50) print("Numeric Tuple Items = ", numericTuple ) floatTuple = (10.25, 11.20, 19.37, 41.598) print("Float Tuple Items = ", floatTuple ) stringTuple = ('orange', 'Mango', 'Grape', 'Apple') print("String Tuple Items = ", stringTuple ) booleanTuple = (True, False, False, True, True) print("Boolean Tuple Items = ", booleanTuple ) mixedTuple = ('orange', 25, 'Mango', 36.75, False, 10) print("Mixed Tuple Items = ", mixedTuple ) nestedTuple = (10, 20, ('orange', 'Mango'), 30) print("Nested Tuple Items = ", nestedTuple ) listTuple = (10, 20, ['Grape', 'Apple'], 70) print("List Tuple Items = ", listTuple )