2.2.2 Flashcards

1
Q

what are the different ways of string manipulation?

A

-length
-slicing
-substring
-position
-concatenate

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

length

A

number of characters within a string

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

example of length

A

len.(name)

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

slicing

A

the process of extracting a part of the string

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

example of slicing

A

name=Theo
newname[:3] gives the value The

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

substring

A

part of a string

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

example of substring

A

name = “Isabelle”
name [3:7] gives the value bell

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

position

A

character in a specific position in a string

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

concatenate

A

the process of joining two strings

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