if test < 700
length = 3
test = ''.join([str(random.randint(1, 9)) for x in range(length)])
def generate_number(length, maximum):
num = int(''.join([str(random.randint(1, 9)) for _ in range(length)]))
if num < maximum:
return num
else:
return generate_number(length, maximum)
length = 3
test = '{}{}'.format(random.randint(1,6), ''.join(str(random.randint(1,9)) for _ in range(length-1)))