Write code to retrieve the address of the variables a and b.
Answers
Answered by
1
a, b = 69, 999
address_a, address_b = hex(id(a)), hex(id(b))
print(f"address_a: {address_a}\naddress_b: {address_b}")
Answered by
1
Answer:
Use Python 3
a, b = 69, 999
a, b = 69, 999address_a, address_b = hex(id(a)), hex(id(b))
a, b = 69, 999address_a, address_b = hex(id(a)), hex(id(b))print(f"address_a: {address_a}\naddress_b: {address_b}")
Similar questions