Questions Flashcards

1
Q

to check if a string contains only characters and is not empty

A

isalpha()

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

to check if a string contains characters or digits and is not empty

A

isalnum()

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

to check if a string contains digits and is not empty

A

isdecimal()

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

to get a lowercase version of a string

A

lower()

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

to check if a string is lowercase

A

islower()

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

to get an uppercase version of a string

A

upper()

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

to check if a string is uppercase

A

isupper()

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

to get a capitalized version of a string

A

title()

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

to check if the string starts with a specific substring

A

startswith()

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

to check if the string ends with a specific substring

A

endswith()

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

to replace a part of a string

A

replace()

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

to split a string on a specific character separator

A

split()

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

to trim the whitespace from a string

A

strip()

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

to append new letters to a string

A

join()

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

to find the position of a substring

A

find()

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

to give you the length of a string

A

len()