I have a Multidimensional array in Python.
How do I go about sorting the second array, by the first – all the while keeping it in the same order?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
I’m not sure from your answer if this is what you want, but take a look and see. If I have a multidimensional array x:
and I want to sort the second subarray by the first subarray, I could do the following:
Is that what you’re looking for?