Basics Flashcards
1
Q
Escape characters
A
2
Q
String literals can span multiple lines.
A
One way is using triple-quotes: “"”…””” or ‘'’…’’’. End of lines are automatically included in the string, but it’s possible to prevent this by adding a \ at the end of the line. The following example:
3
Q
Concatination and repeats
A
the + operator, and repeated with *
4
Q
String indexing
A
5
Q
String slicing
A
6
Q
One way to remember how slices work is to think of the indices as pointing . . .
A
7
Q
String immutability
A
8
Q
Lists
A
9
Q
Indexing and Slicing lists
A
10
Q
Slicing lists
A
11
Q
Concatinating lists
A
12
Q
List mutability
A
13
Q
len()
A
14
Q
Nesting Lists
A
15
Q
print()
A