Python零散知识管理

  • %s和%r的区别
    • __str__ 返回的%s: easy to read
    • __repr__返回的%r: unambiguous: 获取对象各个属性的标准字符串表示形式
原文地址:https://www.cnblogs.com/ryu-manager/p/9349436.html