several python tricks