logo CodeStepByStep logo


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.

Type your Python solution code here:

This is a function exercise. Write a Python function as described. Do not write a complete program; just the function(s) above.

You must log in before you can solve this problem.

Log In

Need help?

If you do not understand how to solve an exercise or why your solution doesn't work, please contact your TA or instructor.
If something seems wrong with the site (errors, slow performance, incorrect tests, etc.), please

Is there a problem? Contact a site administrator.

©, all rights reserved.