Question: Write a Python function that accepts a list of integers and a single integer, and returns a different named last, of the same length as
Write a Python function that accepts a list of integers and a single integer, and returns a different named last, of the same length as the list of integers. Where the elements of the list are 0 for each number in the original list that is not divisible by the single integer, and 1 for each number that is divisible. The function should work for a list of any length.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
