变量和打印变量之间的区别

这个问题在这里已经有了答案:

  • __str__和__repr__之间的区别? 21个答案

  • 在Python中, print在其参数上显示__str__的结果,这可能与__repr__不同。 更多,请看这里:Python中__str__和__repr__的区别


    这是因为之间的差异

    __str__

    __repr__。

    。 差异。 str和repr

    链接地址: http://www.djcxy.com/p/28327.html

    上一篇: Difference between variable and print variable

    下一篇: working of \n in python