摘要: map() lambda set() 持续更新中 阅读全文
posted @ 2018-09-02 17:54 Kay_xs 阅读(6271) 评论(0) 推荐(2) 编辑
摘要: # for 循环实现九九乘法表for i in range(1, 10): # 控制九九乘法表的行数 for j in range(1, i+1): # 控制九九乘法表的列数 print("{}*{}={}".format(j, i, j*i), end="\t") # {}表示空位,而.format()是去填补那些空位! print() # 换行 阅读全文
posted @ 2018-09-02 17:00 Kay_xs 阅读(176) 评论(0) 推荐(0) 编辑
摘要: # while循环实现九九乘法表num_one = 1while num_one <= 9: num_two = 1 while num_two <= num_one: print("%s*%s=%s" % (num_two, num_one, num_two * num_one), end="\t") num_two += 1num_one += 1print() 阅读全文
posted @ 2018-09-02 16:51 Kay_xs 阅读(172) 评论(0) 推荐(0) 编辑