Chap. 10 (Tuples) Flashcards

(10 cards)

1
Q

Define Comparable

A

A type where one value can be checked to see if it is greater than, less than, or equal to another value of the same type. Types that are comparable can be put in a list and sorted.

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

Define Data Structure

A

A collection of related values, often lists, dictionaries, or tuples.

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

Define DSU

A

The abbreviation of “decorate-sort-decorate” is a pattern that involves building a list of tuples, sorting, and extracting part of the result.

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

Define Gather

A

The operation of assembling a variable-length argument tuple.

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

Define Hashable

A

A type that has a hash function. Immutable types, like integers, floats, and strings, are hashable; mutable types like lists or dictionaries are not.

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

Define Scatter

A

The operation of treating a sequence as a list of arguments.

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

Define Shape

A

(of a data structure) , A summary of the size, type, and composition of a data structure.

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

Define Singleton

A

A list (or other sequence) with a single element.

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

Define Tuple

A

An immutable sequence of elements.

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

Define Tuple Assignment

A

An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated, and then its elements are assigned to the variables on the left.

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