Python Tutorial: Sorting Lists, Tuples, and Objects

Python Tutorial: Sorting Lists, Tuples, and Objects

Corey Schafer

8 лет назад

268,374 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

tatiface80
tatiface80 - 24.10.2023 19:35

the reason they removed the dislike button was because they did not want people to dislike this video because its so good

Ответить
GLR
GLR - 19.09.2023 09:06

What is dont understand is, how " e_sort" is linking to employees table.? We are not passing any argument in e_sort function.

Ответить
Ricky
Ricky - 08.04.2023 23:46

A missed opportunity on sorting dictionaries.

Ответить
Egor Erofeev
Egor Erofeev - 29.12.2022 18:39

Great tutorial. However, I get
"TypeError: '<' not supported between instances of 'str' and 'int'" in the last example, when I try to sort by age and salary. Anyone knows how to deal with that? I'm using Pydroid 3 if it matters.

Ответить
Daniel Khadivi
Daniel Khadivi - 03.12.2022 04:33

Awesome video, so very well explained. Thank you for sharing.

Ответить
Handsome_Hero
Handsome_Hero - 13.10.2022 13:38

Absolutely amazing

Ответить
Mohit Yadav
Mohit Yadav - 11.10.2022 22:59

you're incredible at explaining stuff man

Ответить
Saljesh Maharjan
Saljesh Maharjan - 10.10.2022 13:16

such a finest tuts i love it , thank you corey schafer

Ответить
Buzz B
Buzz B - 03.10.2022 20:53

Very useful, thanks. In another video about comprehensions, it was suggested to use a comprehension in place of lambdas for readability. How could that be achieved with the example in this video?

Ответить
Dima Sanin
Dima Sanin - 12.09.2022 18:33

how to sort by keys and values in same time please?

Ответить
OĞUZ TÜRKYILMAZ
OĞUZ TÜRKYILMAZ - 12.07.2022 20:44

Thank you

Ответить
Aiman Tabreez
Aiman Tabreez - 24.05.2022 17:52

Hey, at last you use the attrgetter method so what's the difference between the attrgetter and itemgetter

Ответить
Алексей Соков
Алексей Соков - 09.05.2022 11:52

2022

Ответить
Stefano Palliggiano
Stefano Palliggiano - 02.04.2022 17:11

Thank you for the video. Can the "sorted" built-in method deal with ties and break them according to another attribute. For example, in your Employee class, is it possible to write a function (as argument for the key parameter) that sorts according to age and, if there is a tie, then sorts according to salary?

Ответить
Yihong Li
Yihong Li - 25.03.2022 11:02

Your video is the best for Python learners !!!!!!!!

Ответить
Registered Flex Offender
Registered Flex Offender - 22.03.2022 11:48

watched so many videos until I saw yours and it finally clicked thanks man

Ответить
Movie's playback
Movie's playback - 28.02.2022 22:19

what if you were given (1,7),(1,3),(3,4,5),(2,2) n you were requested to sort using the last element of the tuple

Ответить
zeitkapsel // robin
zeitkapsel // robin - 20.02.2022 04:04

thanks bro!

Ответить