摘要: 1. if...elif...else: 语法: if 判断条件: 语句... elif 判断条件: 语句... else: 语句... #elif语句可以有0个或多个 2. while和for循环: while 判断条件: 语句... for iterating_var in sequence: 阅读全文
posted @ 2017-12-09 23:02 reyinever 阅读(166) 评论(0) 推荐(0)
摘要: 1.整数和数字组成的字符串之间的转换: >>> int("123") 123 >>> str(123) '123' >>> int("1.23") #浮点数字符串和整型不能互转,需要借助中间类型(float) Traceback (most recent call last): File "<std 阅读全文
posted @ 2017-12-09 22:33 reyinever 阅读(199) 评论(0) 推荐(0)