← Retour à la référence Python

()

Module : builtins

Applique une fonction à chaque élément d'un itérable.

📝 Syntaxe

map(fonction, iterable)

💡 Exemples

list(map(str, [1, 2, 3]))
['1', '2', '3']
list(map(lambda x: x*2, [1, 2, 3]))
[2, 4, 6]
EdTech AI