1 ifステートメントが複数の整数をカバーするこのようなifステートメントを設定する方法はありますか?
variable = random.randrange(1,10)
if variable is between 1 - 3
then do this
if variable is between 4-5
then do this
if variable is between 6-9
then do this
または多分このようなもの
a = 1,2,3,4,5,6,7,8,9,10
variable = random.randrange(1,10)
if variable == a:
then do this