+ 1
takewhile and filter
so is there any difference between takewhile and filter functionay?
4 Réponses
+ 2
Ok after some research i have found that takewhile stops when the condition is not met while filter evaluate the whole list.
+ 1
i guess that when you need to use takewihle you have to import it from itertools but filter is a pridefined function. I hope that help you make a deference ^^
+ 1
hmmm it make sense, thanks very much gonna apply it in console
0
yeah i know this one thanks anyway. i was excepting a more important difference cuz if this was all the difference so why should somebody bother to rewrite it at the first place