I have one problem in building a list of id using django. if i choose more than 1 id it ok but if i choose only one it will produce extra \',\' in list.
test
thats' how python displays the tuples with single values , also note that the recommended syntax for creating a tuple with single value is also x = (1,) that helps in differentiating a tuple from a function call .
If you really want an output like you describe you can try
testa = tuple([k['id'] for k in queryset.values('id')])
if len(testa)==1:
print '(%s)'%testa[0]
else:
print testa