PYTHON |Ciągi znaków |Kodowanie znaków Flashcards

1
Q

zamienia kod liczbowy na symbol

A

chr(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

zamienia symbol na jego kod liczbowy

A

ord(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Aby umieścić w ciągu znaków elementy takie jak tabulator, przejście do nowej linii, apostrof czy cudzysłów posłużymy się :

A

sekwencjami ucieczki

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

tabulator

A

\t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

nowa linia

A

\n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

apostrof

A

\’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

cudzysłów

A

\”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

backslash

A

\

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

\t

A

tabulator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

\n

A

nowa linia

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

\’

A

apostrof

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

\”

A

cudzysłów

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

\

A

backslash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly