摘要: 1 name='hu\tqihang' #\t是TAB键 1.打印相关 2.找相关 3.判断相关 4.变化相关 5.替换相关 1 print(name.replace('h','H',1)) #用H替换name中的h,只替换一个 阅读全文
posted @ 2018-04-14 22:31 年份原浆 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 1.数据类型 1.1数字 整型int,如2 浮点型float,如3.14和314E-2 复数complex,如(-5+4) 1.2布尔值 真或假 1或0 1.3字符串 'hello world' 2.数据运算 3.三元运算 1 result = 值1 if 条件 else 值2 如果条件为真:res 阅读全文
posted @ 2018-04-14 22:07 年份原浆 阅读(163) 评论(0) 推荐(0) 编辑