Python: tips and tricks