New course! Every coder should learn Generative AI!
Try a free lesson+ 1
I do not see any difference between takewhile and filter. Can someone help?
I do not see any difference between takewhile and filter. Can someone help?
2 Answers
+ 3
filter will work for the whole sequence whereas takewhile will work till the condition is true.