return the first count multiples of number in desc order in a list. e.g call with input (3,2) returns [6,3] call with input(5,3) returns [15,10, 5] plz help me with this how can i do it using map()??
Regarding your usage of the
map(function, iterable) function: it applies a function to the iterable agrument, so you'll need some elements on which to apply the function.
Since you're using Python, you can introduce also a lambda function. For example (pseudo-code):
# map definition - map (function, iterable) function input (number, multiplier) iterable := reverse_range (multiplier, 0) l := list_of ( map ( lambda mult: number * mult, iterable) ) return l
But again, if it's not mandatory to use the
map function, you can easily generate this using only the
range function (hint - make use of the optional step argument, which can be also negative).