【发布时间】:2011-09-12 13:14:35
【问题描述】:
我有以下列表:
["stephane", "philippe", "hélène", ["hugo", "jean-michel", "fernand"], "gustave"]
我想这样订购:
["gustave", "hélène", ["fernand", "hugo", "jean-michel"], "philippe", "stephane"]
注意:如果用户后面有嵌套列表,则该列表必须位于该用户的右侧。
除此之外,所有嵌套列表的工作方式都相同。它是递归的。
【问题讨论】:
标签: python list nested alphabetical sorted