Question: Write a function called decrement _ list that accepts a single list of numbers as a parameter. It should return a copy of the list
Write a function called decrementlist that accepts a single list of numbers as a parameter. It should return a copy of the list where each item has been decremented by one. Use map to do this! For example:
decrementlist #
decrementlist #
Tips:
Remember map doesn't return a list on its own. decrementlist however, should return a list.
You can either pass map another name function or use a lambda. A lambda is preferable. Print
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
