Re: How can I get this result?

2015-02-15 Thread Krishnasagar Subhedarpage
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

Re: How can I get this result?

2015-02-15 Thread Shai Efrati
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): >

Re: How can I get this result?

2015-02-15 Thread Shai Efrati
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

How can I get this result?

2015-02-15 Thread aronivicki
[{'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