String Methods Flashcards

(46 cards)

1
Q

String Methods

capitalize()

A

Converts the first character to upper case

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

String Methods

casefold()

A

Converts the string to lower case

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

String Methods

center()

A

Returns a centered string

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

String Methods

count()

A

Returns the number of times a specified value occurs in a string

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

String Methods

encode

A

Returns an encoded version of the string

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

String Methods

endswith()

A

Returns true if the string ends with the specified value

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

String Methods

expandtabs()

A

Sets the tab size of the string

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

String Methods

find()

A

Searches the string for a specified value and returns the position of where it was found

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

String Methods

format()

A

Formats specified values in a string

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

String Methods

format_map()

A

Formats specified values in a string

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

String Methods

index()

A

Searches the string for a specified value and returns the position of where it was found

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

String Methods

isalnum()

A

Returns True if all characters in the string are alphanumeric

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

String Methods

isalpha()

A

Returns True if all characters in the string are in the alphabet

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

String Methods

isascii()

A

Returns True if all characters in the string are ascii characters

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

String Methods

isdecimal()

A

Returns True if all characters in the string are decimals

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

String Methods

isdigit()

A

Returns True if all characters in the string are decimals

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

String Methods

isidentifier()

A

Returns True if the string is an identifier

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

String Methods

islower()

A

Returns True if all characters in the string are lower case

20
Q

String Methods

isnumeric()

A

Returns True if all characters in the string are numeric

21
Q

String Methods

isprintable()

A

Returns True if all characters in the string are printable

22
Q

String Methods

isspace()

A

Returns True if all characters in the string are whitespaces

23
Q

String Methods

istitle()

A

Returns True if the string follows the rules of a title

24
Q

String Methods

isupper()

A

Returns True if all characters in the string are upper case

25
# String Methods join()
Joins the elements of an iterable to the end of the string
26
# String Methods ljust()
Returns a left justified version of the string
27
# String Methods lower()
Converts a string into lower case
28
# String Methods lstrip()
Returns a left trim version of the string
29
# String Methods maketrans()
Returns a translation table to be used in translations
30
# String Methods partition()
Returns a tuple where the string is parted into three parts
31
# String Methods replace()
Returns a string where a specified value is replaced with a specified value
32
# String Methods rfind()
Searches the string for a specified value and returns the last position of where it was found
33
# String Methods rindex()
Searches the string for a specified value and returns the last position of where it was found
34
# String Methods rjustify()
Returns a right justified version of the string
35
# String Methods rpartition()
Returns a tuple where the string is parted into three parts
36
# String Methods rsplit()
Splits the string at the specified separator, and returns a list
37
# String Methods rstrip()
Returns a right trim version of the string
38
# String Methods split()
Splits the string at the specified separator, and returns a list
39
# String Methods splitlines() ## Footnote `
Splits the string at line breaks and returns a list
40
# String Methods startswith()
Returns true if the string starts with the specified value
41
# String Methods strip()
Returns a trimmed version of the string
42
# String Methods swapcases()
Swaps cases, lower case becomes upper case and vice versa
43
# String Methods title()
Converts the first character of each word to upper case
44
# String Methods translate()
Returns a translated string
45
# String Methods upper()
Converts a string into upper case
46
# String Methods zfill()
Fills the string with a specified number of 0 values at the beginning