ruk·si

🐍 Python
Debugging

Updated at 2017-01-03 01:22

Prefer print() over print. Old print is not available on Python 3.0>.

# bad
print 'Hello!'

# good
print('Hello!')

Define __str__ and __repr__ for debugging. Print representation for classes.

Sources