News for hackers. Stuff that matters.
Re:Python’s tug of war between beginner-friendly and advance... by roelschroeven on Friday February 05, 2021 @05:34AM (#26034880)
> And I think using `sorted(key=)` is more Pythonic than a generator expression ;)

But it doesn't do the same thing. The original code extracted the xs from the coordinate pairs, sorted; your code sorts the coordinate pairs by their x values, but doesn't extract the xs from them.

Re:Python’s tug of war between beginner-friendly and advance... by michaelhoffman on Friday February 05, 2021 @01:01PM (#26039236)
Oops! Good point! Unfortunately too late for me to edit.