python 实现的 直接插入排序法
摘要:
str=input('plz input some numbers for sorting without any separate')doit=list(str)for a in range(1,len(doit)): for b in range(a): if doit[a] > doit[b]: continue else: substitute=doit[a] del doit[a] doit.insert(b,substitute) breakprint(doit)自己写的直接插入排序法,正在不断学习python中。。。 阅读全文
posted @ 2011-11-16 16:17 hawkgogo 阅读(200) 评论(0) 推荐(0) 编辑