#!/usr/bin/python3
#==============================================================================
# Get the reference of a string object using id(obj)
#==============================================================================
print("Content-Type: text/html \n")     #http header with newline char (required for the web)

print('<pre>')                          #to produce better display on the web 

name = "sam"
addr = id(name)
print(F"name={name} \t is at location: {addr} \t in hex {addr:x}")                     
name = "john"
addr = id(name)
print(F"name={name} \t is at location: {addr} \t in hex {addr:x}")          #at a different location           

name.upper()
addr = id(name)
print(F"name={name} \t is at location: {addr} \t in hex {addr:x}")          #did name change?           
name = name.upper()
addr = id(name)
print(F"name={name} \t is at location: {addr} \t in hex {addr:x}")          #did name change?