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
#6
(Nov-29-2023, 02:03 AM)rob101 Wrote:
(Nov-29-2023, 01:57 AM)gohanhango Wrote: In my case, it is actually important to maintain the order of the static list and follow the order of the static list.

In that case, simply use the index positions of the source list as a positional argument for the sub-list.

My actual data actually has more than 4000 values. So if you mean searching every index of the sublist, it might not be good to search every individual index of the sublist. I'm aware that there are stuff life divide and conquer for that? What would you recommend I study with regards to those?

The solution I posted using dict function works well for me but I'm still interested in the other ways I could go about this.
Reply


Messages In This Thread
RE: Copying the order of another list with identical values - by gohanhango - Nov-29-2023, 02:12 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