Variables in a list : Variables in List : List PYTHON examples


PYTHON examples » List » Variables in List »

 

Variables in a list


Variables in a list

X = [123]
L = ['a', X, 'b']            # embed references to X's object
D = {'x':X, 'y':2}

X[1'surprise'            # changes all three references!

print L

print D


           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo List
» Variables in List