a = (1)
b = ('y')
The output of type(a) is int, isn't it supposed to be a tuple? Similarly, type(b) is str.
How does this make it an int or str or float etc for the single value inside the round brackets?
a = (1)
b = ('y')
The output of type(a) is int, isn't it supposed to be a tuple? Similarly, type(b) is str.
How does this make it an int or str or float etc for the single value inside the round brackets?
That's because you do not have the correct syntax of a one-element tuple:
type((1)) # int
type((1,)) # tuple