I need to write Python code that compares/relays through 2 lists of integers and then prints the smaller number of each element. I currently have this:
x = range(0, 2**32)
y = range(2**32, 2**64)
def minimum(a, b):
"""print the minimum for each element of 2 lists of integers"""
for i in (a,b):
print(min(a, b))
I am getting an error which reads :
"'<' not supported between instances of 'range' and 'range'."
Is there another way to solve my problem without the range function?
min(i).for i, j in zip(a, b): print(min(i, j)).2**64as upper boundary. It tends to take a few thousand years.range(2**32)will be exhausted quite a bit before the second range, so as long as you don't useitertools.zip_longestyou'll be fine