Strings Flashcards

(43 cards)

1
Q

Converts the first character to upper case

A

capitalize()

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

Converts string into lower case

A

casefold()

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

Returns a centered string

A

center()

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

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

A

count()

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

Returns an encoded version of the string

A

encode()

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

Returns true if the string ends with the specified value

A

endswith()

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

Sets the tab size of the string

A

expandtabs()

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

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

A

find()

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

Formats specified values in a string

A

format()

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

Formats specified values in a string

A

format_map()

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

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

A

index()

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

Returns True if all characters in the string are alphanumeric

A

isalnum()

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

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

A

isalpha()

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

Returns True if all characters in the string are decimals

A

isdecimal()

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

Returns True if all characters in the string are digits

A

isdigit()

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

Returns True if the string is an identifier

A

Returns True if the string is an identifier

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

Returns True if all characters in the string are lower case

A

islower()

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

Returns True if all characters in the string are numeric

19
Q

Returns True if all characters in the string are printable

A

isprintable()

20
Q

Returns True if all characters in the string are whitespaces

21
Q

Returns True if the string follows the rules of a title

22
Q

Returns True if all characters in the string are upper case

23
Q

Joins the elements of an iterable to the end of the string

24
Q

Returns a left justified version of the string

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