When I start debugging I usually fill up my entire code with prints to get some info out of it.
Now I used to write something like this
1 |
print "Some print " + str(var) |
or
1 |
print "Some print %s" %var |
However I started to get annoyed by it as I would forget converting ints to str etc.
So I started writing it like this:
1 |
print "Some print ", var |
This first of all saves a lot of time typing, because of the comma, but also python will not try to combine the data and will just print whatever is provided without adding a new line in between.