Difference between variable and print variable

This question already has an answer here:

  • Difference between __str__ and __repr__? 21 answers

  • In Python, print shows the result of __str__ on its arguments, which may be different from __repr__ . For more, see here: Difference between __str__ and __repr__ in Python


    it is beacause of differences between

    __str__

    and

    __repr__.

    . diff. str and repr

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

    上一篇: 寻求html.unescape(“&nbsp”)

    下一篇: 变量和打印变量之间的区别