Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
What is a String? | Strings
Python Data Types
course content

Course Content

Python Data Types

Python Data Types

1. Numeric Types
2. Boolean Type
3. Strings

bookWhat is a String?

A string it is a sequence of characters, which can contain both numbers and letters. But, let's highlight, that this sequence of characters must be enclosed in quotation marks (either single or double).

Example of creating a string using single quotes:

Example of creating a string using double quotes:

It is important to know how to create multi-line strings. In these situations single and double quotes do not work. Here we need to use three quotes. Let's look at what this looks like in practice.

Python 3.6 has a way to format strings that allows us to use built-in expressions inside string constants. This approach is called f-strings

Let's look at the examples.

Task

Swipe to show code editor

test

You have to fill in the blanks.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 1
toggle bottom row

bookWhat is a String?

A string it is a sequence of characters, which can contain both numbers and letters. But, let's highlight, that this sequence of characters must be enclosed in quotation marks (either single or double).

Example of creating a string using single quotes:

Example of creating a string using double quotes:

It is important to know how to create multi-line strings. In these situations single and double quotes do not work. Here we need to use three quotes. Let's look at what this looks like in practice.

Python 3.6 has a way to format strings that allows us to use built-in expressions inside string constants. This approach is called f-strings

Let's look at the examples.

Task

Swipe to show code editor

test

You have to fill in the blanks.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 1
toggle bottom row

bookWhat is a String?

A string it is a sequence of characters, which can contain both numbers and letters. But, let's highlight, that this sequence of characters must be enclosed in quotation marks (either single or double).

Example of creating a string using single quotes:

Example of creating a string using double quotes:

It is important to know how to create multi-line strings. In these situations single and double quotes do not work. Here we need to use three quotes. Let's look at what this looks like in practice.

Python 3.6 has a way to format strings that allows us to use built-in expressions inside string constants. This approach is called f-strings

Let's look at the examples.

Task

Swipe to show code editor

test

You have to fill in the blanks.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

A string it is a sequence of characters, which can contain both numbers and letters. But, let's highlight, that this sequence of characters must be enclosed in quotation marks (either single or double).

Example of creating a string using single quotes:

Example of creating a string using double quotes:

It is important to know how to create multi-line strings. In these situations single and double quotes do not work. Here we need to use three quotes. Let's look at what this looks like in practice.

Python 3.6 has a way to format strings that allows us to use built-in expressions inside string constants. This approach is called f-strings

Let's look at the examples.

Task

Swipe to show code editor

test

You have to fill in the blanks.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 3. Chapter 1
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt