![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python学习
newica
这个作者很懒,什么都没留下…
展开
-
选择排序,插入排序,希尔排序 Python
选择排序 def selection(List): length=len(List) for i in range(length): Min=i for j in range(i,length): if List[j]<List[Min]: Min=j ...原创 2020-04-02 15:21:27 · 78 阅读 · 0 评论 -
PYTHON 学习 逗号代码
编写一个函数,它以一个列表值作为参数,返回一个字符串。 spam = ['apples', 'bananas', 'tofu', 'cats'] def list2str(spam): str1 = ' ' for i in range(len(spam)-1): str1 =str1 + str(spam[i]) + ',' + ' ' if...原创 2019-05-09 20:52:27 · 403 阅读 · 0 评论