Mar-25-2017, 02:07 PM
Hi,
in my Python-Script have a class.
Based on that class, several instances should be generated.
But because I do not know how many instances I need when the code is executed, I want to use a list:
Example, how I thought it could work, but it doesn't:
class addresses():
...
...
...
for i, item in enumerate(address_liste):
address[i] = addresses()
==> I cannot use lists for class-instances??? How to do it right?[/i]
in my Python-Script have a class.
Based on that class, several instances should be generated.
But because I do not know how many instances I need when the code is executed, I want to use a list:
Example, how I thought it could work, but it doesn't:
class addresses():
...
...
...
for i, item in enumerate(address_liste):
address[i] = addresses()
==> I cannot use lists for class-instances??? How to do it right?[/i]