2.2 string manipulation Flashcards
1
Q
what to use to slice strings?
A
parts of a string can be extracted by giving the index location in the formation:
[start position:end position]
2
Q
variable.upper()
A
this means that the variable will be made in to all caps
3
Q
variable.replace(“a”,”x”)
A
this will replace all a’s in the variable with x’s