我有这样的清单。你知道吗
第一:(苹果、榴莲、樱桃、鸡蛋、香蕉)
第二:((香蕉,b1,b2,b3,b4),
(榴莲,d1,d2,d3,d4),
(苹果,a1,a2,a3,a4),
(蛋,e1,e2,e3,e4),
(樱桃、c1、c2、c3、c4)
我想用第一张单子排列第二张单子。
所以我期待这个。你知道吗
((apple,a1,a2,a3,a4),
(durian,d1,d2,d3,d4),
(cherry,c1,c2,c3,c4),
(egg,e1,e2,e3,e4),
(banana,b1,b2,b3,b4))
请告诉我怎么做。
谢谢。你知道吗
Tags:
用字典怎么样?你可以试试这个:
首先,这些是元组,其次,你给出的所有示例实际上都不是字符串,所以我为你做了这些。你知道吗
现在让我们先将其转换为字典:
不,我们有选择器:
然后我们排序并创建列表:
回答:
相关问题 更多 >
编程相关推荐