我正在尝试请求具有最小、最大和特定增量的特定投注金额。当我运行以下代码时,程序会循环遍历数组中的每个元素,而不是停止。
from pylab import *
import random
bank = 20000
betrange=range(100,20100,100)
print "Hello Kathy, welcome to the Golden Brighton casino. We have reserved a high roller table for your bank of 20,000. How much would you like to bet per spin? The table has a 100 minimum bet with a maximum of 20,000."
print "The available legal bets are as follows:"
bet=raw_input("Place your bets please:")
for i in range(len(betrange)):
if betrange[i] == bet:
print bet,"Your bet has been accepted, can you make a million?"
break
else:
print bet,"Please enter a legal bet. The table minimum is 100, with a maximum of 20000 in increments of 100."