Python中的一些坑 Posted on 2019-02-16 Edited on 2019-05-26 In Python Views: Symbols count in article: 98 Reading time ≈ 1 mins. Python中没有自增或自减运算符,即没有++或-- python对文件内容进行write操作时, 会以写入内容覆盖当前内容, 但是后面未覆盖的不会清除, 所以需要使用truncate方法先清空后面的内容 Thank you for your reward ! Donate WeChat Pay Alipay Post author: DiDong Post link: https://didongdongdi.github.io/2019/02/16/Python中的一些坑/ Copyright Notice: All articles in this blog are licensed under BY-NC-SA unless stating additionally.