input={1:5,2:8,9:3,11:4,18:3,21:4,3:8}
and I would like to do the group by operation and perform the sum operation on
the value in those dictionary ..
like grp_1=1,2,3 ; grp_2=9,11,18 ; grp_3= 21
and output should like as below
grp_1= 21 (5+8+8 dict values)
grp_2= 10 (3+4+3 dict values)
grp_3= 4
Please suggest us the simple way..