Sort 2d Array With Multiple Columns: Sorted Function vs Sort Method In Python

preview_player
Показать описание
Sometimes, I forget whether to use a sorted function or the sort method. For example, I'll want to mutate my original array, and I'll use the wrong method sorted, or I don't want to mutate my original array, and I'll use the wrong sort list method!

This is a quick refresher on what each approach does.

Рекомендации по теме