sorting of strings has some problem with this code

前端 未结 0 537
名媛妹妹
名媛妹妹 2021-01-29 08:56
def sort(string):
n = len(string)
for i in range(n):
count = 0
for j in range(0, n-i-1): 
if string[j] > string[j+1] :
string[j], string[j+1] = string[j+1], string[j]         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题