Chapter 8 Key Terms Flashcards

1
Q

Indexing

A

Is used to access individual elements of a sequence like strings, lists, or tuples.

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

IndexError Exception

A

An exception occurs when you try to access an index that is outside the valid range of indices for a sequence.

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

Concatenation

A

Combining two or more strings or sequences into a single string or sequence.

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

Immutable

A

The content in strings cannot be changed once created.

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

Slicing

A

Extract a portion of a sequence, such as a string or a list, by setting a start and end index.

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

in

A

Is used to check if a particular element exists in a sequence.

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

not in

A

Is used to check if a particular element does not exist in a sequence.

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

isalnum

A

A way to check if all characters in a string are alphanumeric.

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

isalpha

A

A way to check if all characters in a string are alphabetic.

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

isdigit

A

A way to check if all characters in a string are digits.

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

islower

A

A way to check if all characters in a string are in lowercase.

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

isspace

A

A way to check if all characters in a string are whitespace characters.

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

isupper

A

A way to check if all characters in a string are in uppercase.

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

lower

A

A way to convert all characters in a string to lowercase.

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

lstrip

A

A way to remove leading whitespace characters from a string. (Left)

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

lstrip(char)

A

A way to remove leading occurrences of a certain character from a string. (Left)

17
Q

rstrip

A

A way to remove trailing whitespace characters from a string. (Right)

18
Q

rstrip(char)

A

A way to remove trailing occurrences of a certain character from a string. (Right)

19
Q

strip

A

A way to remove leading and trailing whitespace characters from a string.

20
Q

strip(char)

A

A way to remove leading and trailing occurrences of a certain character from a string.

21
Q

upper

A

A way to convert all characters in a string to uppercase.

22
Q

endswith

A

A way to verify if a string ends with a specified substring.

23
Q

find

A

A way to find the first occurrence of a substring in a string and return its index.

24
Q

replace

A

A way to replace occurrences of a substring with another substring.

25
Q

startswith

A

A way to verify if a string starts with a specified substring.

26
Q

Repetition Operator *s

A

Is used to repeat a sequence a specified number of times.

27
Q

split

A

A way to split a string into a list of substrings based on a certain delimiter.