0
Why second output is False? Please help me?
9 Antworten
+ 4
I had run it it shows
Both
True
False
+ 3
Then what you want
+ 3
Because list one is same as list 2 but list 1 is not list 2
+ 2
Similar and equals are different.
For example, Two twin sister, same hair, same cloths, same eyes...
They are equals? Yes.
They are the same? No.
Are two sister, not the same.
I have a laptop, a lot of peoples have same laptop, but not it. It's mine.
+ 2
Actually u created two lists
Then u tested if the both list have same objects which came true
And
Then
U tested using 'is' keyword which checked whether the both lists are stored on same memory address and u created two different lists so It came to be false.
Note If u try the same with integer variable till 256 it will show true because when we create two in objects of less than 256 and same value they are stored at same memory address u can verify the same by using
id(variable_name)
0
yes! But why second output is false..
0
I want to know why second output is false.
0
But both object is same?
0
Wow what a exact answer👍👍👍👍