Что добавить в код? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Что добавить в код?

надо вставить пропущенную функцию. не могу понять какую. https://code.sololearn.com/cZO28k6R971Z/?ref=app

17th Apr 2018, 4:51 PM
andrey
andrey - avatar
1 Answer
+ 1
I think you are looking for the function filter(b,l) whose arguments are a boolean function that acts on the elements of b. the element of b is produced (as in an iterator) when the function is true. list() is needed to convert the result of map (a map object) to a list print(list(filter(a,b))) # output must be [0,2,3,4]
23rd Apr 2018, 4:11 PM
Michael Gribskov
Michael Gribskov - avatar