As the question suggests, how do I do a loop to check if all values in a list are bigger than another set of values in another list? Assuming that the length of each list is the same and each value will be compared to another based on its index.
For example:
aList=[1,5,10,15,23]
bList=[0,4,9,14,22]
for x in range(len(aList)):
if aList[x]>bList[x]:
print("All values in aList are bigger than bList")
else:
print("Not all values in aList are bigger than bList")
This is what I have now, but due to the loop, I ended up printing 5 times. I only wish for the result to print once. Does anyone know a way around this?