摘要: while 条件: 代码块 print() 定时器:import time ,time.sleep(1),等待1秒 n=True while n: print('1') time.sleep(1) n=False print('end') import time kaishi = 1 flag=Tr 阅读全文
posted @ 2018-06-22 16:47 黄瓜不是好瓜 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 一:if...else if 条件: 内容一: 内容二: else: 内容三: 内容四: 严格按照缩进,否则报错,IndentationError:expected an indented block #一个等号是赋值 #两个等号是比较 #!=表示不等于 a=1 b=2 if a<b: print( 阅读全文
posted @ 2018-06-22 15:36 黄瓜不是好瓜 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 一:第一次写python 输出:print('hello word') 单行注释:###,无效的内容,只做注释 多行注释:"""""", 二:input,输入 a=input("请输入:") print(a) 三:getpass ,将用户输入的内容不可见,例如用户密码 ,使用前先导入:import 阅读全文
posted @ 2018-06-22 15:05 黄瓜不是好瓜 阅读(106) 评论(0) 推荐(0) 编辑