Random Python stuff

Some random Python hints I learned over the last week while writing on my first Django website (Note: All things mentioned here are in the official docs, but I haven't noticed them before looking at code others have written):

If you want to have a tuple, better play it safe and write ("hello",) instead of ("hello"). Since the braces can also be used to control the precedence of a statement, adding the extra "," will make sure, that you really get a tuple, no matter what number of elements is in there.

Named groups is in my opinion one of the coolest things I've seen with RE done so far. I don't know, if this also works in other languages, but it just makes regex much more readable if you have something like this:

Comment on this

You can use Markdown here.

Please answer the question in this field. It should help keeping spambots out ;-)