2021年5月15日

python-*args,**kwargs以及拆包

摘要: def test(a, b, c, *args, **kwargs): print(a) print(b) print(c) print(args) print(kwargs)if __name__ == '__main__': test(1, 2, 3, 44, 55, 66, d=777, e= 阅读全文

posted @ 2021-05-15 22:24 ClarenceSun 阅读(58) 评论(0) 推荐(0) 编辑

python-冒泡排序算法

摘要: def maopao(list): len_list = len(list) for i in range(len_list - 1, 0, -1): count = 0 for j in range(i): if list[j] > list[j + 1]: list[j + 1], list[j 阅读全文

posted @ 2021-05-15 21:05 ClarenceSun 阅读(44) 评论(0) 推荐(0) 编辑

python-队列

摘要: class Quene(): """队列""" def __init__(self): self.__list = [] def enqueue(self,item): """往队列中添加元素""" self.__list.append(item) def dequeue(self): """从队列 阅读全文

posted @ 2021-05-15 16:42 ClarenceSun 阅读(45) 评论(0) 推荐(0) 编辑

导航