I have a list and I want every item to be created into an object with the name from the list.
list = [Paul, Jess, Craig...]
Paul = Person()
Jess = Person()
Craig = Person()
Any way to do this quickly as my list is very long?
Read more here: https://stackoverflow.com/questions/64397854/python-is-there-a-way-to-create-objects-in-a-similar-way-that-setattr-works
This content was originally published by Elena at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.