Python Define Inline Function