7554425D-0054-440D-B95E-D2ABC13D62CD Created with sketchtool.
Your Saved Info Packages

View your saved Course or Program Packages containing pricing and detailed curriculum.

Speak with a Learning Advisor.

Have any questions? We'll call you.

Fill out the form below and a Learning Advisor will reach out at a time convenient for you.

Please pick a valid date and time between 9 AM and 8 PM eastern (Monday to Friday)

By clicking "Book a call," you accept our Terms and will also receive exclusive offers and updates about new courses, workshops and events.

Python Tutorial

Python String

Ready to start your career in Data? Find out more about BrainStation's Python Course

Python provides a number of basic data types that can be used to store different kinds of values in a variable. Let’s explore the first of these data types: python string.

Python String

The string data type is used to store information that is a sequence of characters including alphabets, symbols, and numbers. There are multiple ways to create a string data type in Python using a single-quote , a regular quotation mark (double quotes) , or a set of three single quotes (triple quotes) ‘’’. Using a set of three single quotes is a specific way of creating a string data type that can span multiple lines and have whitespace characters preserved inside it. Let’s create some string data types in our notebook following along with the code in the image below:

As seen above, a string can be created using single, double, or triple quotes. Even though we purposely entered some whitespace characters in the voicemail_message variable, it is preserved when we see the value stored in that variable. The preferred way of creating string variables is by using single quotes unless whitespace needs to be preserved.

Set Password

You already have an account with BrainStation, but you still need to set up a password.