我需要对字符串进行排序,然后我想出了以下函数.
def mysort(comb_):
str = []
size = len(comb_)
for c in comb_:
str.append(c)
str.sort()
return ''.join(str)
有没有办法让它紧凑?
| 归档时间: |
|
| 查看次数: |
12436 次 |
| 最近记录: |