a = 10 # range -5 to 256
b = 10 # range -5 to 256
print(id(a))
print(id(b))
print(a is b)
# OK THAT'S FINE
しかし
a = 10 # range -5 to 256
b = 10 # range -5 to 256
print(id(a))
print(id(b)) # same memory adress
print(a is b)
# That's working
c = 3 # range -5 to 256
d = 5 # range -5 to 256
print(id(c))
print(id(d))
print(c is d)
同じメモリ アドレスではありません O_o False 理由は... うーん、範囲は問題ないはずです !