Зміст курсу
Python Data Types
Python Data Types
What 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.
Завдання
You have to fill in the blanks.
Дякуємо за ваш відгук!
What 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.
Завдання
You have to fill in the blanks.
Дякуємо за ваш відгук!
What 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.
Завдання
You have to fill in the blanks.
Дякуємо за ваш відгук!
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.
Завдання
You have to fill in the blanks.