Hi,
consider two objects,
ls_dic=[{'key1':a , 'key2': b},{'key1':c , 'key2': d}]
num=sum([len(x.values()) for x in ls_dic])
print '%s' % ','.join(sorted(sum([x.values() for x in ls_dic],[])))[:-num]
print '%s' % ','.join(sorted(sum([x.values() for x in ls_dic],[])))[num:]
This is will help a lot
sorry.
assuming:
l = [{'key1':'a' , 'key2': 'b'},{'key1':'c' , 'key2': 'd'}]
for e in l:
for k, v in e.iteritems():
print v,
print
On 2/15/15, Shai Efrati wrote:
> assuming:
> l = [{'key1':a , 'key2': b},{'key1':c , 'key2': d}]
>
> for e in l:
> for k, v in iteritems(e):
>
assuming:
l = [{'key1':a , 'key2': b},{'key1':c , 'key2': d}]
for e in l:
for k, v in iteritems(e):
print v,
print
On 2/15/15, aronivi...@gmail.com wrote:
> [{'key1':a , 'key2': b},{'key1':c , 'key2': d}]
> a,b
> c,d
>
> --
> You received this message because you are subscribed
[{'key1':a , 'key2': b},{'key1':c , 'key2': d}]
a,b
c,d
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to thi
4 matches
Mail list logo