/* 看板娘 */ /* 粒子吸附*/
摘要: 1.abs() 绝对值# print(abs(123))# print(abs(-123))# 2.all() any()# l = [11,22,33,0]# print(all(l)) # 所有的元素都为True结果才是True# print(any(l)) # 所有的元素只要有一个为True结 阅读全文
posted @ 2021-11-22 19:47 红绿灯的黄呀 阅读(49) 评论(0) 推荐(0)
摘要: for循环的本质 d = {'name':'jason','pwd':123,'hobby':'read'} ​res = d.__iter__() # StopIteration 此处运用了迭代器对象 while True: 添加循环功能 try: print(res.__next__()) ex 阅读全文
posted @ 2021-11-22 19:40 红绿灯的黄呀 阅读(33) 评论(0) 推荐(0)