[issue27857] n identical objects divide into m different groups

2016-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please don't post random code on the issue tracker. Use python-list to discuss your beginner efforts. Except in unusually cases, the editor you use in not relevant. -- assignee: terry.reedy -> components: -IDLE resolution: -> not a bug stage: ->

[issue27857] n identical objects divide into m different groups

2016-08-24 Thread JAG3R
New submission from JAG3R: hello, everyone. I'm a newbie learner.^^ Recently, I learn the itertools and write this function... heap(m,n)-> X=[] X.append([n ,0,...,0] (len=m)) X.append([n-1,1,...,0]) ... X.append([n-1,0,...,1]) X.append([n-2,2,...,0]) X.append([n-2,1,1..,0]) ... X.append([0