Python for while for 嵌套for i in range(1, 10): for j in range(1, i+1): print(f'{i} x {j} = {i * j}',end=' ') print()while嵌套i = 1while i < 10: j = 1 while j < i + 1: print(f'{i} x {j} = {i * j}', end=' ') j += 1 print() i += 1while for嵌套i = 1while i < 10: for j in range(1, i + 1): print(f'{i} x {j} = {i * j}', end=' ') print() i += 1退出、break、continuex = Truewhile x: s = input('input:') if s == 'e': x = False print('exit , else 会运行') elif s == 'ee': print('exit , else 不会运行') break elif s == 'c': continue # 不做任何事情 print('print:', s)else: # beak时 不会执行 print('hello') Python 2022-04-16 评论 193 次浏览
django form field 表单输出选项{{ form.as_table }}:以表格形式加载表单元素{{ form.as_p }}:以段落形式加载表单元素{{ form.as_ul }:以列表形式加载表单元素阅读全文 django 2022-04-11 评论 297 次浏览