+ 6
When a single integer is specified in parentheses, it is taken as an integer. So, (5) is same as 5. Just as we do in math: 7*5 is same as 7*(5) But, when you put a comma after 5, you get a tuple with a single integer element. Just try finding out type of (5,)
20th Apr 2020, 3:18 AM
Pooja Somani
Pooja Somani - avatar
+ 4
A single element in parentheses which is int or float or boolean is considered as its original value . A single element in a parentheses can't make a tuple .
20th Apr 2020, 3:16 AM
Ayush Kumar
Ayush Kumar - avatar