If I have a single element in a tuple it returns type of that element instead of tuple. Why does this happens?
If I check the type of this variable t1 , this will return integer type instead of tuple. Why does it give me this result? t1 = (1) print(type(t1)) Output: int
If I get multiple elements in that tuple it works fine and returns type as tuple. Can someone please explain this concept?
t1=(1,2,3) print(type(t1)) Output: tuple