Python 3 map() built-in function TUTORIAL

preview_player
Показать описание
Tutorial on how to use the map() built-in function from the Python 3 Standard Library.

📖 Please check out my Udemy course here:

Documentation:

⚙️ Recommended Computer Gear:

✈️ Recommended Digital Nomad Gear:
Рекомендации по теме
Комментарии
Автор

Bro, your Python videos are the best on YouTube. You deserve so many more subs!

theaaronimal
Автор

I would say the combine_lists function should be named add, because what the function is really doing is taking two numbers and returning the result of adding them together. This function is then applied to each element of two lists simultaneously using the map function. The end result is indeed the combination of the elements in each of two lists, but the combine_lists function itself doesn't have that functionality, which makes the naming a bit confusing. Adding two lists together with the '+' operator would result in the first list being extended with the elements of the second list -> similar to list1.extend(list2)

felixvanderspek