0

I am new to python and i am trying to understand the map() function, but i haven't been able to understand from past questions.

For example, I have a class called Table that has a constructor that instantiates a Table object. I would like to create a list of table objects called table_objects_list. I can do this using a for loop but I want to learn pythons map() function.

Any help is appreciated, thanks!

3
  • Would you mind providing an example of the kind of output you're expecting? Commented Aug 1, 2017 at 0:49
  • 2
    Why do you want to use map() vs a list comprehension? E.g. list(map(func, iterable)) can be written [func(i) for i in iterable] Commented Aug 1, 2017 at 0:49
  • 2
    You should post some code showing how you tried to use map to make table_objects_list. Commented Aug 1, 2017 at 0:51

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.