Wednesday, 3 July 2019

How to print the address of the variable

a=10
b=10
print(a)
print(id(a))
print(b)
print(id(a))

Output:
10
1494735168
b
1494735168

No comments:

Post a Comment

Files with Exception handling

#Ask the user to take two input integer values var a,b try:     a=int(input("enter any integer value:"))     b=int(input(&qu...