結果 : how to check if value is within range python