2.2.2 Flashcards
1
Q
what are the different ways of string manipulation?
A
-length
-slicing
-substring
-position
-concatenate
2
Q
length
A
number of characters within a string
3
Q
example of length
A
len.(name)
4
Q
slicing
A
the process of extracting a part of the string
5
Q
example of slicing
A
name=Theo
newname[:3] gives the value The
6
Q
substring
A
part of a string
7
Q
example of substring
A
name = “Isabelle”
name [3:7] gives the value bell
8
Q
position
A
character in a specific position in a string
9
Q
concatenate
A
the process of joining two strings