What does `map(str, [1, 2, 3])` produce when converted to a list?

Python Developer Easy

Python Developer — Easy

What does `map(str, [1, 2, 3])` produce when converted to a list?

Key points

  • `map()` applies a function to each element in an iterable
  • The `str` function converts integers to strings in this case
  • The output is a list of strings, not integers

Ready to go further?

Related questions