Python Forum
Copying the order of another list with identical values
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copying the order of another list with identical values
#4
(Nov-29-2023, 01:45 AM)rob101 Wrote: What is unclear here is why the order is important. List objects are "random access" and as such the order should not be relevant. If (for whatever reason) the order IS important, then possibly the best course of action would be to first have the source list sorted, then once the sub-list has been assembled, also sort that sub-list. That way the order will be preserved.

In my case, it is actually important to maintain the order of the static list and follow the order of the static list.
Reply


Messages In This Thread
RE: Copying the order of another list with identical values - by gohanhango - Nov-29-2023, 01:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Search Excel File with a list of values huzzug 4 1,318 Nov-03-2023, 05:35 PM
Last Post: huzzug
  Copy List Not Copying BAbdulBaki 3 684 Aug-19-2023, 02:03 AM
Last Post: perfringo
  Comparing List values to get indexes Edward_ 7 1,272 Jun-09-2023, 04:57 PM
Last Post: deanhystad
  Why do I have to repeat items in list slices in order to make this work? Pythonica 7 1,437 May-22-2023, 10:39 PM
Last Post: ICanIBB
  Adding values with reduce() function from the list of tuples kinimod 10 2,806 Jan-24-2023, 08:22 AM
Last Post: perfringo
  user input values into list of lists tauros73 3 1,126 Dec-29-2022, 05:54 PM
Last Post: deanhystad
  AttributeError: 'list' object has no attribute 'values' ilknurg 4 15,243 Jan-19-2022, 08:33 AM
Last Post: menator01
  Need to parse a list of boolean columns inside a list and return true values Python84 4 2,177 Jan-09-2022, 02:39 AM
Last Post: Python84
  List of dataframe values beginning with x,y or z glidecode 3 1,991 Nov-08-2021, 10:16 PM
Last Post: glidecode
  How to pass list of values to a API request URL chetansaip99 0 3,570 Sep-28-2021, 07:37 AM
Last Post: chetansaip99

Forum Jump:

User Panel Messages

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