python best methods