Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Sorting
#6
j.crater and buran,

Thanks for the response. Your solution works and you taught me something but is there a way to specify the comparison function that sort function uses. For example, if I wanted all prime numbers to come out a head of all composite numbers, is there a way to do that? Is the solution to write my own sort function?

Thanks,
Bob
Reply


Messages In This Thread
Help with Sorting - by rsherry8 - Jan-28-2018, 03:36 PM
RE: Help with Sorting - by buran - Jan-28-2018, 04:10 PM
RE: Help with Sorting - by rsherry8 - Jan-28-2018, 04:44 PM
RE: Help with Sorting - by j.crater - Jan-28-2018, 04:54 PM
RE: Help with Sorting - by buran - Jan-28-2018, 05:14 PM
RE: Help with Sorting - by rsherry8 - Jan-28-2018, 05:38 PM
RE: Help with Sorting - by buran - Jan-28-2018, 07:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sorting a copied list is also sorting the original list ? SN_YAZER 3 3,165 Apr-11-2019, 05:10 PM
Last Post: SN_YAZER

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020