一.in的使用 说明:in有相当多的用处,比如判断,循环for 等. 实例一:in 操作符用于判断关键字是否存在于变量中 s = '男人john' print('男孩' in s) print('男孩john' in s) print('男人jo' in s) print('wusir' not in s) 执行后输出结果为: 注意:in是整体匹配,不会拆分匹配. 示例: a = '男孩John' print('男孩sir' in a) 执行输出:False 实例二:in 做关键字匹配 com…
pycharm 安装设置: 按照百度百科或者官网介绍下载,安装. 激活步骤 1:改host 2.输入激活信息,注意有效期. python 逻辑运算符://返回的均为bool值 与 and A and B 或 or A or B 非 not not A 格式化输出: name = input("your name is: ") age = input("your age is: ") height = input("your height is: "…