There was an error while loading. Please reload this page.
1 parent cb1cc7a commit fa8f8faCopy full SHA for fa8f8fa
demo.py
@@ -0,0 +1,14 @@
1
+x=11
2
+print(x)
3
+print("data type of x",type(x))#x is object of class int and class is user define data type so data type of x is class int
4
+print("id of x:",id(x))#gives uique id
5
+
6
7
+y=12
8
+z=12
9
+print("id of y:",id(x))#id of y and z is same bacause reffering to same value so refference count of 12 is 2
10
+print("id of z:",id(z))
11
12
13
+z=z+1
14
+print("id of z:",id(z))#id will change because now y and z not reffering to same value i.e 11 now z having value 13
0 commit comments