人生与戏

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2019年7月6日

摘要: not supported between instances of 'str' and 'int' : 意思就是字符串不能和int类型的数值比较 阅读全文
posted @ 2019-07-06 11:58 人生与戏 阅读(2374) 评论(0) 推荐(0) 编辑

摘要: 类型检查 type()用来检查值的类型 (整型、浮点型、布尔值、字符串、空值、列表、元组、集合、字典) 该函数会将检查的结果作为返回值返回,可以通过变量来接收函数的返回值 print(type(1)) # <class 'int'> print(type(1.5)) # <class 'float' 阅读全文
posted @ 2019-07-06 11:45 人生与戏 阅读(255) 评论(0) 推荐(0) 编辑