Python 3.4 - Object References

Variables can be created in Python. They can be labelled as anything but do need to have an_underscore if there are more than one word. (i.e. variable_name). The object reference is the value that you assign to the variable (a - the variable is = to the object reference 2, i.e. a = 2)

It's important to note that if you only have one object reference than the variable, no matter what it is, if it is equal to another object reference it will be referring to that object reference.

https://www.youtube.com/watch?v=z_55F4zSjoA

Id-ing a variable will give you it's memory location. It is a way to see if two variable are sharing the same object reference or not.

Comments

Popular posts from this blog

Pyhton 3.4 - Continue

Conversations Ongoing: Valuing Modernization in Early European History

Conversations Ongoing: A Bunch of Amateurs