Miscellaneous
The only useful way I know how to debug programs is to print out information as the program proceeds.
print x
Prints the value of x on the screen.
print x, y
Prints values of
x
,
y
without a line break.
Comment a line:
#
Comment a block:
""" ... """
String representing
x
:
str(x)
Sum of strings to get "x = ...":
"x = " + str(x)