I have written simple Python code
#For String Types
d_new = dict(a_str="captainmarvel", b_str="captainmarvel", c_str="captainmarvel", d_str="captainmarvel")
print(id(d_new['a_str']))
p_str = "captainmarvel"
print(id(p_str))
#For int types
d = dict(a=4, b=4, c=4, d=4)
print(id(d['a']))
p = 4
print(id(p))
it returns output as
270985349584
270985349584
1559653536
1559653536
which are same object ids for integer value 4 and string value "captainmarvel"
. So does python reuses/pools its basic data types e.g. int, string