I am trying to get this code to repeat if the second function does not return False and seem to be having problems.
Furthermore, The if statement in the second function is not accepting the integers that I am passing when it should be (i.e when I pass 1-8). Perhaps range() is not appropriate here?
def askanything():
choice = (int(input("Which battery? (1-8):")))
batchoice(choice)
def batchoice(bat):
if bat in range(1-9):
return True
else:
print("sorry, selection must be between 1-8")
askanything()