Mega Code Archive

 
Categories / Python / Language Basics
 

Same reference to an integer object, a string and a list

x = 0            # x bound to an integer object print x x = "Hello"      # now it's a string print x x = [1, 2, 3]    # and now it's a list print x