python tricks collected from different sources