2013-02-19 Pythonの範囲内判定 x = 9 if x in range(5,10): print('範囲内だお') こうすれば x = 9 if 5 <= x and 10 > x: print('範囲内だお') ってしなくていい