标签:inpu img 算术 代码块 lse 赋值 ima 算术运算符 alt
预留 字符串 整型 (转义)
name = input('name:')
print ('你的名字是:%s'%(name))
name = input('name:')
print (f"你的名字是{name}")
while 条件:
循环体
else:
代码块
while循环两种终止循环的方式
? 1 循环条件为False
? 2 循环体中执行到break
continue关键字:跳出本次循环,开始下一次,当continue为循环体最后一层
else:当while循环体一次都不执行时执行else
break关键字执行时else不执行 因为else属于while循环的一部分
走向
ascii(英1) -- Unicode(英2中4) -- utf-8(英1 欧2 中3)
1 B == 8 b
= += -= *= /=
+ - * / // % **
and (与)or(或)not(非)
and 两者皆真才为真(运行到底)
or 一者为真就为真(运行到真)
in not in
> < >= <= !=
标签:inpu img 算术 代码块 lse 赋值 ima 算术运算符 alt
原文地址:https://www.cnblogs.com/albert0823/p/10974016.html