Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8251397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:13:27+00:00 2026-06-08T00:13:27+00:00

I have a list of lists – super_list = [seconds, self.flowdata, key] where seconds

  • 0

I have a list of lists –

super_list = [seconds, self.flowdata, key]

where seconds is a ten digit number, self. flowdata is a list of 160 integers and key is an identifying string. Printing super_list would yield many iterations of the following structure, all with different values,

example:

"[[1509321600], 
  ['1', '-1', '4', '7', '7', '1', '-8', '-14', '-24', '-29', '-25', '-24', '-9', '-4', '0', '0', '-5', '-10', '-6', '-5', '7', '-4', '-4', '-11', '5', '3', '9', '5', '3', '3', '6', '-6', '-8', '-6', '-6', '25', '23', '30', '22', '13', '-7', '0', '-1', '-18', '-24', '-28', '-24', '-24', '-18', '-14', '-14', '-12', '-13', '-11', '-15', '-16', '-8', '-3', '-4', '-2', '11', '29', '38', '40', '41', '29', '34', '25', '20', '15', '31', '22', '16', '2', '8', '21', '39', '43', '45', '38', '39', '37', '38', '41', '43', '42', '38', '34', '34', '25', '25', '29', '18', '23', '27', '26', '18', '15', '15', '11', '17', '10', '11', '4', '-3', '-12', '-17', '-14', '6', '5', '13', '4', '-21', '-22', '-16', '-12', '-6', '4', '16', '9', '17', '16', '16', '16', '15', '12', '12', '7', '-2', '-12', '-13', '-5', '-7', '-8', '-12', '-15', '-14', '-11', '-8', '-1', '-1', '-3', '-12', '-7', '-6', '-7', '5', '4', '2', '3', '1', '0', '-12', '-12', '-13', '-17', '-18', '-18', '-15', '-13', '-13', '-16', '-17', '-18', '-18', '-19', '-16', '-13'], 
  '1441-4731-1-10/30/2017']

Each set (or row if you like, as seen above) of seconds, flowdata and key are related.

I want to sort super_list so that seconds is ordered from smallest to largest, but also with its correlating flowdata and key in the same numerical ‘row’ in super_list.

i.e. say the above example was to be the first in the sorted list(1509321600 was the smallest number of seconds in the seconds list), the above flowdata would also be the first in flowdata and the above key “1441-4731-1-10/30/2017” would be the first key.

Help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:13:29+00:00Added an answer on June 8, 2026 at 12:13 am

    Assuming your list looks like: [[seconds1, flowdata1, key1], [seconds2, flowdata2, key2], ...]:

    Just use super_list.sort().

    This will sort by the fields in lexicographic (left-to-right) order. Since seconds is the leftmost field, all entries will be sorted by it.

    You can also sort by a specific field by using the key parameter to sort, e.g.:

    super_list.sort(key=lambda row: row[0]) #sort by seconds field
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of lists, each containing a different number of strings. I'd
I have a list of lists with a various number of elements (int). I
I have a list of lists and want to replace all the occurrences of
I have a list with lists as entries, like so: A <- list(scores1 =
I have a list of lists that looks like this [['ip1',404], ['ip1',200], ['ip1',200], ['ip2',200],
I have a List of Lists, call it listholder. I want to count how
I have a list of lists: lst = [[567, 345, 234], [253, 465, 756,
i have a list of lists that looks like this: dupe = [['95d1543adea47e88923c3d4ad56e9f65c2b40c76', 'ron\\c',
I have a list of lists that looks like this: x[[state]][[year]] . Each element
I have a list of lists, and I need to find the longest one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.