Python programming best practices