-
Notifications
You must be signed in to change notification settings - Fork 131
/
description.ru.yml
39 lines (27 loc) · 1.92 KB
/
description.ru.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
name: Multi-line строки
theory: |
Третий способ определения строк — это использование многострочных (multi-line) литералов. Для того, чтобы описать такую "многострочную строку", нужно заключить её в тройные кавычки - `"""` или `'''`. Между парой таких тройных кавычек можно переносить текст со строки на строку и все переносы строк сохранятся.
```python
text = '''Пример текста,
состоящего из нескольких строк.
Здесь не нужно экранировать одинарные кавычки ' и двойные "
'''
print(text)
```
<pre class='hexlet-basics-output'>
Пример текста,
состоящего из нескольких строк.
Здесь не нужно экранировать одинарные кавычки ' и двойные "
</pre>
Обратите внимание на то, что в конце текста есть пустая строка. Эта строка появилась в тексте потому, что мы поставили закрывающие кавычки `'''` на новой строке. Если не переносить закрывающие кавычки на новую строку, эта пустая строка в тексте не появится.
instructions: |
Запишите в переменную `text` текст, который приведен ниже. Используйте тройные кавычки.
```
Lannister, Targaryen, Baratheon, Stark, Tyrell...
they're all just spokes on a wheel.
This one's on top, then that one's on top, and on and on it spins,
crushing those on the ground.
```
definitions: []
tips: []