Sort Flashcards

1
Q

Sort() method

A

Used with lists

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

Sort() function

A

Used with iterables

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

What does sort do in lists?

A

Sorts items from highest to lowest

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

If reverse = true in the sort method what happens?

A

Items are sorted from highest to lowest

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

What do you set in a sorted function

A

The iterable (the variable name) and the key

(Also whether your want it to sort the list in reverse or not)

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