Chapter 9 - Definitions Flashcards
Define collection data type
A data type in which the values are made up of components, or elements that are themselves values
Define default value
The value given to an optional parameter if no argument for it is provided in the function call
Define dot notation
Use of the dot operation, “.”, to access functions inside a module, or too access methods and attributes of an object
Define immutable data type
A data type whose values cannot be changed. Modifying functions create a totally new object that does not change the original one
Define index
A variable or value used to select a member of an ordered collection, such as character from a string, or an element from a list
Define optional parameter
A parameter written in a function header with an assignment to a default value which it will receive if no corresponding argument is given for it in the fun call
Define slice
A part of a string (substring) specified by range of indices. More generally, a subsequence of any sequence type in Python can be created using the slice operator (sequence[start:stop])
Define traverse
To iterate through the elements of a collection, performing a similar operation on each
Define whitespace
Any of the characters that move the cursor without printing visible characters. The constant string.whitespace contains all the white-space characters.