I have an array of classes and I want to create objects from them. It works:
classArray = [Auto, Wheel] objectArray = [] for myClass in classArray: objectArray += [myClass()]
Can I use the map function to do the same?
objectArray = map( ??? , classArray)
My apologies if this is a stupid question. I am new to Python.
Thanks!
source share