00:01
Hello student, here the objects and value.
00:03
An object is a self -contained entity that has its own identity and the state.
00:09
A value is a piece of data that can be stored in a variable or passed as an argument to a function.
00:16
Equivalents and identical.
00:18
Two objects are equivalent if they have the same value.
00:21
Two objects are identical if they have the same objects.
00:25
So, this is the difference between the equivalent and the identical.
00:29
So, here i have taken the example in python.
00:33
So here list1 is this one, 1, 2, 3, list2 is 1.
00:36
We are carrying the same element.
00:39
So list1 and list2 are the equivalent but not identical.
00:42
We can say here the identical.
00:44
So print if i print this list1 equal to list2 means are these equivalent.
00:52
So it will print true.
00:55
Why? because containing the same same element.
00:59
But if i will say list1 is list2 means list1 is list1 is list2 means having the same objects.
01:07
So in this case it will print the false.
01:11
Now come to the object reference and aliasing.
01:14
So alias, a reference is a pointer to an object.
01:18
When you assign a value to the variable, you are creating a reference to the object.
01:22
Aliasing occurs when two variables point to the same object.
01:26
So here same object means if its name is x and if i give its name x is renamed as a y then they are pointing to the same thing.
01:39
Then i will say i am aliasing.
01:43
So in python we use this.
01:44
So list1 suppose list2, list2 is equal to list1 means i have assigned all the value of list1 to the list2.
01:52
So list1 and list2 are aliased means both representing the same thing.
01:59
So it will print list1 is list2.
02:03
Yes, list1 is list2.
02:05
If i change the element at the list at the zeroth point then so here the list having 1, 2, 3.
02:13
So this will be at list0.
02:16
This will be list1 1 and this will be list2 2...