Python: how to put constructors in map() function?

Viewed 4707

Say I have a class, with a constructor that takes an integer. I have a list of integers. How do I use map() to create a list of objects of this class, each constructed with its respective integer?

3 Answers
Related