Yes Mak, I didn't indented by mistake in the 3 forums I posted. My mistake. For that matter:

- Code: Select all
`def ruleAsc(n):`

a = [0 for i in range(n + 1)]

k = 1

a[0] = 0

a[1] = n

while k != 0:

x = a[k - 1] + 1

y = a[k] - 1

k -= 1

while x <= y:

a[k] = x

y -= x

k += 1

a[k] = x + y

yield a[:k + 1]

I don't see a problem about posting in several forums. Aren't them to get the community helping each other ? 8|

I admit I dunno phyton at all and it seems to me this is a simple piece that phyton gurus could help me achieving the C++ equivalent.

Lazyness (like you posted in the other forum) ? No. not at all. Unfortunatly I don't have time to get knowleage of phyton and the author of this code didn't present a fluxogram (

http://homepages.ed.ac.uk/jkellehe/partitions.php).

Anyway thank you for your help.

PS - I do not expect someone to do the work for me...as I stated in my first line of the post I asked if anyone could help me...

Regards.