Learn How to Use Strings as Objects in Python 3


show more Understanding strings as objects provides you with in-depth training on Developer. Taught by Bill Weinman as part of the Python 3 Essential Training show less
please wait ...

Understanding strings as objects

In Python, strings are objects, just like everything is an object. We are going to take a little bit of time and look at what this means, because this is not what people are used to who have been programming in other programming languages. But in Python, the "everything is an object" paradigm has particular impact on how we operate on strings. And also, it's a little bit different than it was in Python 2. Even though strings were objects in Python 2, they weren't fully first class objects in the sense that they are in Python 3, and the interface is a lot more consistent in Python 3, but it also means that it's significantly different than it was in Python 2.

So if you're familiar with Python 2, this is worth paying attention to just a little bit. So here we have a string, 'this is a string,' and the value of that of course is a string. Now, if we assign it to a variable, now we have a variable, and if we just get the value of that variable, it says, &quo...

Understanding strings as objects
Video duration: 3m 25s 6h 36m Beginner

Viewers:

Understanding strings as objects provides you with in-depth training on Developer. Taught by Bill Weinman as part of the Python 3 Essential Training

Subjects:
Developer Web
Software:
Python
Author:
please wait ...