On https://www.online-python.com/ , I have got True which I suppose to be the correct the answer since tuples are immutable. Thus can be saved in same memory space. Does anyone have any explanation?
On https://www.online-python.com/ , I have got True which I suppose to be the correct the answer since tuples are immutable. Thus can be saved in same memory space. Does anyone have any explanation?
None, theiskeyword is really only useful for checking for object identity that the program deliberately arranges (for example, by doingy = x). Please see the linked duplicate for details.print(x is y). It worked for Python 3.12.1