Chapter 8 Flashcards
object
something a variable can refer to. For now, you can use ‘object’ and ‘value’ interchangeably.
sequence
an ordered set; that is, a set of values where each value is identified by an integer index.
item
one of the values in a sequence
index
an integer value used to select an item in a sequence, such as a character in a string.
slice
a part of a string specified by a range of indices.
empty string
a string with no characters and length 0, represented by two quotation marks.
immutable
the property of a sequence whose items cannot be assigned.
traverse
to iterate through the items in a sequence, performing a similar operation on each.
search
a pattern of traversal that stops when it finds what it is looking for.
counter
a variable used to count something, usually initialized to zero and then incremented.
method
a function that is associated with an object and called using dot notation.
invocation
a statement that calls a method