Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions modules/10-basics/10-hello-world/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ print("Hello, World!")

The way `print()` works: you put the text you want to display inside the parentheses. To let Python know it's text and not something else, wrap it in quotes. Both single and double quotes work — just make sure the opening and closing quote match:

```python
print("Hello, World!")
<!-- NOTE: две формы записи кавычек и есть предмет урока. text чтобы форматтер не свёл их к одной форме -->

```text
print('Hello, World!')
print("Hello, World!")
```

According to the Python style guide (PEP 8), single quotes are preferred for strings when there's no apostrophe inside.
The Python style guide (PEP 8) prefers neither single nor double quotes: pick one style and stick to it. This course uses double quotes. PEP 8 does advise picking the other kind when the string itself contains a quote — the apostrophe in `it's` breaks a single-quoted string, so that one needs double quotes.

```text
Code Interpreter Screen
Expand Down
8 changes: 5 additions & 3 deletions modules/10-basics/10-hello-world/es/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ print("Hexlet - escuela de programación")

El comando sigue siendo el mismo, solo cambia el contenido de los paréntesis. Para que el programa entienda que se trata precisamente de texto, este se encierra entre comillas. Se pueden usar comillas simples `'...'` o dobles `"..."`, pero la comilla de apertura y la de cierre deben coincidir.

```python
print("Hexlet - escuela de programación")
<!-- NOTE: две формы записи кавычек и есть предмет урока. text чтобы форматтер не свёл их к одной форме -->

```text
print('Hexlet - escuela de programación')
```

Según el estándar de estilo de código aceptado en Python (PEP 8), se recomienda usar comillas simples para las cadenas. Si dentro de la cadena hay un apóstrofo, las comillas simples romperán la sintaxis, por lo que en esos casos se usan las dobles.
El estándar de estilo de código PEP 8 no prefiere las comillas simples ni las dobles: lo importante es elegir un estilo y mantenerlo. En este curso usamos las dobles. PEP 8 aconseja que, si dentro de la cadena hay un apóstrofo o una comilla, se usen las del otro tipo para no escapar nada. Por ejemplo, el apóstrofo de `it's` rompe una cadena entre comillas simples, así que aquí hacen falta las dobles.

```python
print("it's a Python") # apóstrofo dentro, por eso comillas dobles
Expand Down
8 changes: 5 additions & 3 deletions modules/10-basics/10-hello-world/ru/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@

Команда остается той же, меняется только содержимое скобок. Чтобы программа понимала, что это именно текст, он заключается в кавычки. Можно использовать одинарные `'...'` или двойные `"..."`, но открывающая и закрывающая кавычки должны совпадать.

```python
print("Хекслет - школа программирования")
<!-- NOTE: две формы записи кавычек и есть предмет урока. text чтобы форматтер не свёл их к одной форме -->

```text
print('Хекслет - школа программирования')
```

По принятому в Python стандарту оформления кода (PEP 8) рекомендуется использовать одинарные кавычки для строк. Если внутри строки есть апостроф, одинарные кавычки сломают синтаксис, поэтому в таких случаях используют двойные.
Стандарт оформления кода PEP 8 не отдает предпочтения одинарным или двойным кавычкам: важно выбрать один стиль и придерживаться его. В этом курсе мы используем двойные. PEP 8 советует: если внутри строки есть апостроф или кавычка, взять другие кавычки, чтобы не экранировать. Например, апостроф в `it's` сломает строку в одинарных кавычках, поэтому здесь нужны двойные.

Check notice on line 29 in modules/10-basics/10-hello-world/ru/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/10-basics/10-hello-world/ru/README.md#L29

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/10-basics/10-hello-world/ru/README.md:29:163: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

Check notice on line 29 in modules/10-basics/10-hello-world/ru/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/10-basics/10-hello-world/ru/README.md#L29

Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/10-basics/10-hello-world/ru/README.md:29:194: Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

Check notice on line 29 in modules/10-basics/10-hello-world/ru/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/10-basics/10-hello-world/ru/README.md#L29

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/10-basics/10-hello-world/ru/README.md:29:208: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

```python
print("it's a Python") # апостроф внутри, поэтому двойные кавычки
Expand Down
10 changes: 5 additions & 5 deletions modules/10-basics/50-syntax-errors/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ print('Hodor)

The closing quote is missing. Running this produces:

```bash
```console
$ python index.py
File "index.py", line 1
print('Hodor)
^
SyntaxError: EOL while scanning string literal
File "index.py", line 2
print('Hodor)
^
SyntaxError: unterminated string literal (detected at line 2)
```

The error message may look unfamiliar at first, but that's fine — the more you encounter these messages, the faster you'll understand them at a glance.
Expand Down
12 changes: 6 additions & 6 deletions modules/10-basics/50-syntax-errors/es/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ print('Hodor)

En este código no se cerró la comilla, lo que hace que el programa sea incorrecto desde el punto de vista de la sintaxis. Intentemos ejecutar el programa y el intérprete dará un error:

```bash
python index.py
File "index.py", line 1
print('Hodor)
^
SyntaxError: EOL while scanning string literal
```console
$ python index.py
File "index.py", line 2
print('Hodor)
^
SyntaxError: unterminated string literal (detected at line 2)
```

El texto, por falta de costumbre, puede resultar incomprensible, pero eso es normal: cuanto más te encuentres con esos errores, más entenderás a primera vista qué ocurrió.
Expand Down
12 changes: 6 additions & 6 deletions modules/10-basics/50-syntax-errors/ru/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ print('Hodor)

В этом коде не закрыта кавычка, что делает программу некорректной с точки зрения синтаксиса. Попробуем запустить программу, и интерпретатор выдаст ошибку:

```bash
python index.py
File "index.py", line 1
print('Hodor)
^
SyntaxError: EOL while scanning string literal
```console
$ python index.py
File "index.py", line 2
print('Hodor)
^
SyntaxError: unterminated string literal (detected at line 2)
```

Текст с непривычки может быть непонятен, но это нормально, чем больше вы будете сталкиваться с такими ошибками, тем больше вы с первого взгляда будете понимать, что произошло.
Expand Down
10 changes: 6 additions & 4 deletions modules/20-arithmetics/20-basic/es/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@

La variante sin espacios también funciona:

```python
3 + 4
8 / 2
7 % 3
<!-- NOTE: запись без пробелов и есть предмет примера. text чтобы форматтер не расставил пробелы -->

Check notice on line 132 in modules/20-arithmetics/20-basic/es/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/20-arithmetics/20-basic/es/README.md#L132

Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN) Suggestions: `an` URL: https://languagetool.org/insights/post/indefinite-articles/ Rule: https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-US Category: MISC
Raw output
modules/20-arithmetics/20-basic/es/README.md:132:142: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
 Suggestions: `an`
 URL: https://languagetool.org/insights/post/indefinite-articles/ 
 Rule: https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-US
 Category: MISC

```text
3+4
8/2
7%3
```

Pero ese código se ve menos cuidado y cuesta más percibirlo rápido. Por eso conviene acostumbrarse desde el principio a escribir con espacios alrededor de los operadores.
10 changes: 6 additions & 4 deletions modules/20-arithmetics/20-basic/ru/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ print(15 % 5) # => 0 (делится без остатка)

Вариант без пробелов тоже работает:

```python
3 + 4
8 / 2
7 % 3
<!-- NOTE: запись без пробелов и есть предмет примера. text чтобы форматтер не расставил пробелы -->

```text
3+4
8/2
7%3
```

Но такой код выглядит менее аккуратно и его сложнее быстро воспринимать. Поэтому лучше сразу привыкать писать с пробелами вокруг операторов.
24 changes: 14 additions & 10 deletions modules/25-strings/10-quotes/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,25 @@

Which of these are strings? In fact, all five of them are:

- With `'Hello'` and `'Goodbye'` everything is obvious, we've already worked with similar constructions and called them strings
- `'G'` and `' '` — are also strings, but they only have one character each
- `''` — is an empty string, so it has zero characters
- With `"Hello"` and `"Goodbye"` everything is obvious, we've already worked with similar constructions and called them strings
- `"G"` and `" "` — are also strings, but they only have one character each

Check notice on line 18 in modules/25-strings/10-quotes/en/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/25-strings/10-quotes/en/README.md#L18

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/25-strings/10-quotes/en/README.md:18:13: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

Check notice on line 18 in modules/25-strings/10-quotes/en/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/25-strings/10-quotes/en/README.md#L18

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/25-strings/10-quotes/en/README.md:18:15: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION
- `""` — is an empty string, so it has zero characters

We consider anything inside quotation marks a string; even if it's just a space, a single character, or no characters at all.

Above we wrote the strings in single quotes, but this is not the only way. You can also use double quotes:
Above we wrote the strings in double quotes, but this is not the only way. You can also use single quotes:

```python
print("Dracarys!")
<!-- NOTE: две формы записи кавычек и есть предмет урока. text чтобы форматтер не свёл их к одной форме -->

```text
print('Dracarys!')
```

Now imagine you want to type the string _Dragon's mother_. The apostrophe before the letter **s** — is the same symbol as the single quote. Let's print it:

```python
print('Dragon's mother')
# SyntaxError: invalid syntax
# SyntaxError: unterminated string literal (detected at line 1)
```

This program won't work. From Python's point of view, the line started with a single quote and then ended after the word **dragon**. Next were the characters `s mother` without quotation marks, so it's not a string. And then there was a one line-opening quotation mark that was never closed: ``)`. This code contains a syntax error – you can even tell by the way the code is highlighted.
Expand All @@ -47,18 +49,20 @@

Now imagine we want to create this string:

```python
```text
Dragon's mother said "No"
```

It has both single and double quotes. We need to somehow tell the interpreter that the quotation marks are one of the characters inside the string, not the beginning or the end of the string.

The **escape character** is used for this: `\` — a backslash. If we put `\` in front of a quotation mark (single or double), the interpreter will recognize the quotation mark as an ordinary character inside the string, not the beginning or the end of the string:

```python
<!-- NOTE: экранирование двойной кавычки и есть предмет урока. text чтобы форматтер не переписал его в экранирование апострофа -->

Check notice on line 60 in modules/25-strings/10-quotes/en/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/25-strings/10-quotes/en/README.md#L60

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/25-strings/10-quotes/en/README.md:60:172: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

Check notice on line 60 in modules/25-strings/10-quotes/en/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/25-strings/10-quotes/en/README.md#L60

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/25-strings/10-quotes/en/README.md:60:195: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

```text
# We escape the quotation marks around No so that the interpreter
# can recognize them as part of the string
print('Dragon\'s mother said "No"')
print("Dragon's mother said \"No\"")
# => Dragon's mother said "No"
```

Expand Down
28 changes: 16 additions & 12 deletions modules/25-strings/10-quotes/es/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

Todas esas variantes son cadenas.

- `'Hello'`, `'Goodbye'` y `'G'` son cadenas de varios caracteres o de uno solo.
- `' '` es una cadena formada por un solo espacio.
- `''` es una cadena vacía, en ella no hay ni un carácter. Cumple el mismo papel que el 0 en matemáticas.
- `"Hello"`, `"Goodbye"` y `"G"` son cadenas de varios caracteres o de uno solo.
- `" "` es una cadena formada por un solo espacio.

Check notice on line 17 in modules/25-strings/10-quotes/es/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/25-strings/10-quotes/es/README.md#L17

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/25-strings/10-quotes/es/README.md:17:1: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

Check notice on line 17 in modules/25-strings/10-quotes/es/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/25-strings/10-quotes/es/README.md#L17

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/25-strings/10-quotes/es/README.md:17:3: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION
- `""` es una cadena vacía, en ella no hay ni un carácter. Cumple el mismo papel que el 0 en matemáticas.

Es decir, todo lo que está dentro de las comillas se considera una cadena, aunque solo haya un espacio o no haya absolutamente nada.

Si se muestran las cadenas en la pantalla, `'Hello'` y `'Goodbye'` se verán con claridad. Pero `' '` y `''` pueden despistar, porque la salida de una cadena vacía parece una ausencia total, mientras que una cadena con un espacio muestra un «espacio vacío» que visualmente es difícil de distinguir. Sin embargo, Python las diferencia con claridad. Una cadena vacía significa la ausencia de caracteres, mientras que una cadena con un espacio contiene un carácter de espacio concreto.
Si se muestran las cadenas en la pantalla, `"Hello"` y `"Goodbye"` se verán con claridad. Pero `" "` y `""` pueden despistar, porque la salida de una cadena vacía parece una ausencia total, mientras que una cadena con un espacio muestra un «espacio vacío» que visualmente es difícil de distinguir. Sin embargo, Python las diferencia con claridad. Una cadena vacía significa la ausencia de caracteres, mientras que una cadena con un espacio contiene un carácter de espacio concreto.

Check notice on line 22 in modules/25-strings/10-quotes/es/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/25-strings/10-quotes/es/README.md#L22

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/25-strings/10-quotes/es/README.md:22:90: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

Check notice on line 22 in modules/25-strings/10-quotes/es/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/25-strings/10-quotes/es/README.md#L22

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/25-strings/10-quotes/es/README.md:22:92: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

Pregunta de control. ¿Son estas cadenas iguales o no?

Expand All @@ -33,7 +33,7 @@

En programación hay una trampa terminológica.

- Una cadena (string) es un tipo de dato (el que analizamos arriba), por ejemplo 'hello'.
- Una cadena (string) es un tipo de dato (el que analizamos arriba), por ejemplo `"hello"`.
- Una línea (line) es una fila de texto en un archivo o en el código.

Por ejemplo, en el código de abajo hay una línea, pero no una cadena.
Expand All @@ -51,20 +51,22 @@

En Python las cadenas se pueden escribir tanto entre comillas simples como entre dobles.

```python
print("Hello")
<!-- NOTE: две формы записи кавычек и есть предмет урока. text чтобы форматтер не свёл их к одной форме -->

```text
print('Hello')
print("Hello")
```

Por defecto se acostumbra a usar comillas simples `'`, si dentro de la cadena no se necesitan dobles. Ese estilo lo sigue el estándar oficial de formato de código _PEP8_.
El estándar oficial de formato de código _PEP8_ no prefiere las comillas simples ni las dobles: lo importante es elegir un estilo y mantenerlo. En este curso usamos las dobles, y las simples cuando dentro de la cadena hay comillas dobles.

## El problema de las comillas dentro de la cadena

Imagina que quieres imprimir la cadena _Dragon's mother_. En ella hay un apóstrofo (_'s_) que coincide con el carácter de comilla simple. Probemos así.

```python
print('Dragon's mother')
# SyntaxError: invalid syntax
# SyntaxError: unterminated string literal (detected at line 1)
```

Python decidirá que la cadena termina después de la palabra 'Dragon', y el resto no lo reconocerá como código válido, lo que provocará un error de sintaxis. Para evitarlo, envolvemos la cadena en comillas dobles.
Expand All @@ -83,14 +85,16 @@

A veces en la cadena aparecen los dos tipos de comillas.

```python
```text
Dragon's mother said "No"
```

En ese caso, para que Python no confunda las comillas de dentro de la cadena con las exteriores, se usa el carácter de escape, la barra invertida `\`. Le dice al intérprete que el carácter que la sigue es parte de la cadena y no un carácter de control.

```python
print('Dragon\'s mother said "No"')
<!-- NOTE: экранирование двойной кавычки и есть предмет урока. text чтобы форматтер не переписал его в экранирование апострофа -->

Check notice on line 94 in modules/25-strings/10-quotes/es/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/25-strings/10-quotes/es/README.md#L94

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/25-strings/10-quotes/es/README.md:94:30: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

Check notice on line 94 in modules/25-strings/10-quotes/es/README.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] modules/25-strings/10-quotes/es/README.md#L94

Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
modules/25-strings/10-quotes/es/README.md:94:53: Unpaired symbol: ‘"’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION

```text
print("Dragon's mother said \"No\"")
# => Dragon's mother said "No"
```

Expand Down
Loading
Loading