input={1:5,2:8,9:3,11:4,18:3,21:4,3:8,350:5}
and I would like to do the group by operation and perform the sum operation on
the value of that dictionary.
like grp_1=1,11,21 ; grp_2=9,3,18 ; grp_3= 2
and output should like as below
grp_1= 13 (5+8+8 dict values)
grp_2= 14 (3+4+3 dict values)
grp_3= 13
please suggest the best way to do that and then I should have the option to
customize the groups so that I can add another number in the future...