Nov-21-2020, 11:09 AM
(Nov-20-2020, 11:23 PM)loves Wrote: It is a Letcode problem. https://leetcode.com/problems/add-two-numbers/
I can't print the result as expected. I got the result as<__main__.ListNode object at 0x000001F595801190>
in Spyder.
To make it easy to print out, also implement the
__repr__
method: https://dbader.org/blog/python-repr-vs-str