I cannot run ['abc'].append( MyModel.objects.all() ) since it generates exception 'NoneType' object is not iterable if MyModel has no entry.
any workaround or something like ? : in c++
edit: my statement is actually
','.join([ str(e) for e in ['abc','def'].append( MyModel.objects.all() ) ])
it seems that the problem is caused by append() returning NoneType. I solved this by creating a variable to hold the list and then extend() it