I am new to python and started learning from internet and youtube. I have a question as "Why is the memory location of two variables is same for the different integer variable's declared separately in Python?"
a=[1,2,3]
b=[1,2,3]
print(a==b)
print(a is b)
this give the result as
False
True
but when i try the below the result is "True" for both the cases. Why is it?
a=1
b=1
print(a==b)
print(a is b)
As i am new to programming languages, help me with some free websites where I can get a structured way to learn python with videos and practice exercise with real word examples. That could help me become a data scientist.