#!/usr/bin/env python3
# id: returns object identification

print("***********")
print("id checking")
print("***********")
x0 = 0                # an integer object is created
x1 = 1                # idem
print(id(x0), x0)
print(id(x1), x1, id(x1)-id(x0), "(difference in bits)\n")

print("*************")
print("type checking")
print("*************")
print("x0, type ::   ", x0, type(x0))
x0 = 'a'              # changing type from integer to string
print("x0, type ::   ", x0, type(x0))

print()   
print("****************")
print("strings as lists")
print("****************")
x0 = "I am a string"  # strings are ordered lists
x1 = " |  "  + x0[2] + x0[3]
print(x0, x1)
