logo CodeStepByStep logo

all_less

Language/Type: Python lists

Write a function named all_less that accepts two lists of integers and returns True if each element in the first list is less than the element at the same index in the second list. Your function should return false if the lists are not the same length. For example, if the two lists passed are [45, 20, 300] and [50, 41, 600], your function should return True. If the lists are not the same length, you should always return False.

Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.