-
Book Overview & Buying
-
Table Of Contents
Python Illustrated
By :
At this point, you are acquainted with classes. There are a lot of details to discover later, when working with them in real life, but a few things should be mentioned before we move on to the next chapter.
Here’s something that might blow your mind just a little: almost everything in Python is already an object. To be a little bit more precise (and hopefully without confusing you at this stage), there are many built-in objects that we have created already. Yes, things such as numbers, lists, and text are actually objects! For example, when we create a text value, under the hood, Python creates an instance of a text class.
So, let’s say you write this:
message = "Hello!"
Python is secretly doing this:
message = str("Hello!")

That "Hello!" you see? It’s not just text floating in the void. It’s an object stored in memory. This...