In-place way to apply a permutation to a list? (inverse of sorting-by-key)

后端 未结 7 616
心在旅途
心在旅途 2021-01-02 05:06

Here\'s a example of what I want to do

spam_list = [\"We\", \"are\", \"the\", \"knights\", \"who\", \"say\", \"Ni\"]
spam_order = [0,1,2,4,5,6,3]
spam_list.m         


        
7条回答
提交回复
热议问题