From the course: Complete Guide to Python for Data Engineering: From Beginner to Advanced

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

String manipulation

String manipulation

- [Instructor] Close your eyes and picture yourself as a sculptor. You have a block of marbles. You can shape it, carve it and polish it to create a beautiful statue. In Python, strings are like these block of marbles, and with the right tools, you can shape them to fit your needs. Let's explore string manipulations in the Python. Strings in the Python are sequence of characters. They include letters, numbers, symbols, and even spaces. You can think of string as a sentence or a word. In Python, we define a string by enclosing characters in single quotes or double quotes. Let's jump to our Google Colab and see how we can do it. Let's create our first string, giving a variable name greeting = "Hello Data engineering!!" Now, if I want to use this variable to print it, I just use the statement, print(greetings) and that's it. You have created your first string and you have used it to display its value. Now, this is a pretty…

Contents