Chapter 9 Flashcards Preview

Python > Chapter 9 > Flashcards

Flashcards in Chapter 9 Deck (16)
Loading flashcards...
1
Q

aliases

A

Multiple variables that contain references to the same object.

2
Q

clone

A

To create a new object that has the same value as an existing object. Copying a reference to an object creates an alias but doesn’t clone the object.

3
Q

delimiter

A

A character or string used to indicate where a string should be split.

4
Q

element

A

One of the values in a list (or other sequence). The bracket operator selects elements of a list.

5
Q

index

A

An integer variable or value that indicates an element of a list.

6
Q

list

A

A named collection of objects, where each object is identified by an index.

7
Q

list traversal

A

The sequential accessing of each element in a list.

8
Q

modifier

A

A function which changes its arguments inside the function body. Only mutable types can be changed by modifiers.

9
Q

mutable type

A

A data type in which the elements can be modified. All mutable types are compound types. Lists are mutable data types; strings are not.

10
Q

nested list

A

A list that is an element of another list.

11
Q

object

A

A thing to which a variable can refer.

12
Q

pure function

A

A function which has no side effects. Pure functions only make changes to the calling program through their return values.

13
Q

sequence

A

Any of the data types that consist of an ordered set of elements, with each element identified by an index.

14
Q

side effect

A

A change in the state of a program made by calling a function that is not a result of reading the return value from the function. Side effects can only be produced by modifiers.

15
Q

step size

A

The interval between successive elements of a linear sequence. The third (and optional argument) to the range function is called the step size. If not specified, it defaults to 1.

16
Q

test-driven development (TDD)

A

A software development practice which arrives at a desired feature through a series of small, iterative steps motivated by automated tests which are written first that express increasing refinements of the desired feature.