What is the benefit of using map() in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the benefit of using map() in python?

Since without using map() also we can do the same thing using loops. So why use map()?

12th Apr 2020, 6:09 AM
parag sahu
parag sahu - avatar
3 Answers
+ 5
Because it's simple, beautiful, functional, lazy, cool, and compact? 😉
12th Apr 2020, 6:17 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Tibor Santa got u 😊.
12th Apr 2020, 6:44 AM
parag sahu
parag sahu - avatar
- 1
We use map() instead of loops.. Coz, to shorten the size of the code.. But, it's not good for large projects... 👍
12th Apr 2020, 6:38 AM
sarada lakshmi
sarada lakshmi - avatar