A | B |
two different ways to make sure a string will print a literal backslash | Include two backslashes in a row or create a raw string |
the index of the first character in a string | 0 |
In Python, the characters \n are used to represent what | A newline |
In the list [1, 3, 3.2, "integer"], which element is at index 2 | 3.2 |
methods | functions associated with a class |
Which stride number should you use to reverse the order of characters in a slice | -1 |
data type that can only have the values True or False | boolean |
A literal | the name for an object that is what it appears to be |
returns an element at a specific index & then deletes that element from the list | pop()function |
append() | adds a new element to the end of a list |
special character | a character that has an extra meaning attached to it |
string_var[:6:2] | slices through all characters before index 7 & strides through every other character in the slice |
expression | a programming statement that returns a new value |
the escape character. | \ |
Manipulation | when you change a value |
len() | number of characters in a string |
index() | finds the location of the first time a substring is used in a string |
swapcase() | makes all the lowercase characters in a string uppercase and all of the uppercase characters in a string lowercase |
replace() | finds all of the substrings that match a specific character or set of characters, and then replaces them with another character or set of characters. |
lower() | makes all of the characters in a string lowercase |