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!
map()vs a list comprehension? E.g.list(map(func, iterable))can be written[func(i) for i in iterable]mapto maketable_objects_list.