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


Warning: Unknown: open(/var/lib/php/session/sess_keqrgrlhtruu4l7k01urdm6go0, O_RDWR) failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0