![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
用法查询
文章平均质量分 74
viphbk
这个作者很懒,什么都没留下…
展开
-
格式化字符串%s
//1x ='there are %d types of people.'%10binary ='binary'do_not = "don't"y = 'those who knows %s and those who %s.'%(binary,do_not)print (x)print (y)原创 2019-08-23 22:36:02 · 1884 阅读 · 0 评论 -
Python 异常处理(用try...except...及时捕获、内部消化)
异常名称描述BaseException所有异常的基类SystemExit解释器请求退出KeyboardInterrupt用户中断执行(通常是输入^C)Exception常规错误的基类StopIteration迭代器没有更多的值GeneratorExit生成器(generator)发生异常来通知退出StandardError所有的...原创 2019-09-06 12:46:19 · 186 阅读 · 0 评论