I cannot break out of this function inside of a while loop.
This is the error message
SyntaxError: 'break' outside loop
Code:
import random
while True:
def roll (min, max):
num = random.randrange(min, max)
print(num)
if num == 9:
break
roll(1,10)