在python中,怎么根据数组a对数组b进行排序答:以数组 a 的从小到大的顺序为基准,对数组b进行重排序,并返回排序结果的索引数 import numpy as np a = np.array([0,1,3,2,6,4,5])b = np.array([0,1,2,3,4,5,6])index = np.lexsort((b, a))
python中三个数从小到大排序答:a,b,c = 3,2,1 if a < b:a,b = b,a if a < c:a,c = c,a if b < c:b,c = c,b print(c,b,a)