day2

in和not in(bool)

while,else循环:如果循环被break打断,程序不会走else

字符串的格式化输出

  占位符%s %d %%

  dict类型

  作用:固定模板的输出

逻辑运算符:!=不等于    <>

and,or,not

前后都是比较运算 优先级()>not>and>or

前后都是数值运算

 or: x or y    if x true,则return x,否则return y

  and和or相反

编码

  ascii

  unicode

  utf-8

  gbk

 

posted on 2018-03-19 16:20  nicess  阅读(68)  评论(0编辑  收藏  举报

导航