文章目录 一、小数保留指定位小数 1.%f 方法 2.format函数 3.round()函数 4.直接截断 二、判断变量的数据类型 1.type(): 2.isinstance() 3.__class__.__name__属性 三、Python中的类方法(@classmethod) 四、s
          
文章目录
- 一、小数保留指定位小数
 - 1.%f 方法
 - 2.format函数
 - 3.round()函数
 - 4.直接截断
 
- 二、判断变量的数据类型
 - 1.type():
 - 2.isinstance()
 - 3.__class__.__name__属性
 
- 三、Python中的类方法(@classmethod)
 - 四、str.format与制表符\t设置中文对齐
 - 五、datetime模块timedelta类的使用
 - 六、获取抛出的异常具体信息
 - 七、使用BeautifulSoup库去掉字符串中的HTML标签
 
(免费学习
