Code example:
>>> class Snake:
pass
and then I do this
>>> snake = Snake()
>>> print(snake)
<__main__.Snake object at 0x7f315c573550>
How can I test what this returns?
if snake == "<__main__.Snake object at 0x7f315c573550>":
print("it worked")
the if statement does not work. how can I test what snake is equal to in an if statement? thanks.