I have an object
class Lists:
pass
for item in items_list:
name = str(item.theme)
if hasattr(Lists, name):
setattr(Lists, name, [])
append(value) to this array
else:
setattr(Lists, name, [])
If this object has this attribute I only to append the value to this list. Otherwise I want to add this attribute to the object and then append the value to this list.
items_listcontents and elaborate the expected contents ofthis arraygetattr(Lists, name).append(value)?