From e768b3e2ed3e1c1ce5733b942f03e177e0e00539 Mon Sep 17 00:00:00 2001 From: coderpyaephyothant Date: Sat, 3 Feb 2024 18:58:45 +0630 Subject: [PATCH] 16LessonMemoryAllocation --- 16lesson.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 16lesson.py diff --git a/16lesson.py b/16lesson.py new file mode 100644 index 0000000..5e6d010 --- /dev/null +++ b/16lesson.py @@ -0,0 +1,22 @@ +# Memory address +p = 10 +e = 10 + +t = id(p) +y = hex(p) + +w = id(e) +v = hex(e) + +# print(p) +# print(t) #decimal value +# print(y) #hex value +# print(v) +# print(w) + +if t == w : + print('Same Memory',t,w) +else: + print('Different memory allocation',t,w) + +