I found strange thing about data type of integers with comma at the end of expression (see code below).
Code
a = -1, # strange legal syntax
print('"a" has {} data type'.format(type(a)))
if type(a) == tuple:
print(len(a))
else:
print('It is not a tuple!')
print('If we print "-1," directly, without variable, then ... {}'.format(type(-1,)))
Questions:
Using Jupyter notebook & Spyder console I find different results. What is going on with this? What data type does the variable "a" has: int or tuple?