Made python code less C-like.