The program is written in Python and performs the following steps:
In Python, the trailing comma , is used to create tuples with a single item. In this case, the variable a is first defined as an integer 5, and then redefined as a tuple with one item 5. The print statement and type() function are used to display the value and data type of a after both definitions.
a = 5 print(a) print(type(a)) #create tuple of one item a = 5, print(a) print(type(a))
5 <class 'int'> (5,) <class 'tuple'>
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions