摘要: user_list=[] _bool = True board = ['张三','李小四','王二麻子'] while _bool: dic = {} username = input('账号>>>') if username.lower() == 'q': _bool = False #如果需要多个地方终止循环尽量用bool,也可以用break、 ... 阅读全文
posted @ 2019-02-25 16:16 ChenGouDa 阅读(122) 评论(0) 推荐(0) 编辑
摘要: li = [11,22,33,44,55,77,88,99,90]大于66加入到一个ey,小于66加入到一个ey li = [11,22,33,44,55,77,88,99,90] result = {} l1 = [] l2 = [] for row in li: if row > 66: l1.append(row) # result.setdef... 阅读全文
posted @ 2019-02-25 12:31 ChenGouDa 阅读(549) 评论(0) 推荐(0) 编辑
摘要: #计次循环,这样实现 str_str ='dsfsdfsdf' for x in range(len(str_str)): print(x) print(str_str[x]) 阅读全文
posted @ 2019-02-25 11:35 ChenGouDa 阅读(316) 评论(0) 推荐(0) 编辑