code part1:
name1="rahul"
name2="rahul"
code part2:
name1=[1,2,3]
name2=[1,2,3]
If I run the following code:
print name1 is name2
I get "True" for code part1
and
I get "False" for code part2
why? why the "reference" is same for name1 and name2 in "code part1" and different for name1 and name2 in "code part2??