Consider the following piece of code
x=(1,2,3)
y=(1,2,3)
print(x is y)
When I run this code in the console, it gives back False.
When I run this code in a Python file, it gives back True.
Considering the Python Tutor and other sites, the result needs to be False. How is this possible? Does this have something to do with the way Python stores variables in the memory?
I'm using Python 3.8