Skip to content

Instantly share code, notes, and snippets.

@xfenix
Last active August 2, 2020 15:24
Show Gist options
  • Save xfenix/8002a18fbb8804e780c06e8f2abd7a48 to your computer and use it in GitHub Desktop.
Save xfenix/8002a18fbb8804e780c06e8f2abd7a48 to your computer and use it in GitHub Desktop.
Beautiful fork of python newbies group code example. SyntaxError: too many statically nested blocks -- FUCK YEAH
n=22
z=[0]*(n-1)
for z[0] in range(z[-1],(n-sum(z[:0]))//(n-0)+1):
for z[1] in range(z[0],(n-sum(z[:1]))//(n-1)+1):
for z[2] in range(z[1],(n-sum(z[:2]))//(n-2)+1):
for z[3] in range(z[2],(n-sum(z[:3]))//(n-3)+1):
for z[4] in range(z[3],(n-sum(z[:4]))//(n-4)+1):
for z[5] in range(z[4],(n-sum(z[:5]))//(n-5)+1):
for z[6] in range(z[5],(n-sum(z[:6]))//(n-6)+1):
for z[7] in range(z[6],(n-sum(z[:7]))//(n-7)+1):
for z[8] in range(z[7],(n-sum(z[:8]))//(n-8)+1):
for z[9] in range(z[8],(n-sum(z[:9]))//(n-9)+1):
for z[10] in range(z[9],(n-sum(z[:10]))//(n-10)+1):
for z[11] in range(z[10],(n-sum(z[:11]))//(n-11)+1):
for z[12] in range(z[11],(n-sum(z[:12]))//(n-12)+1):
for z[13] in range(z[12],(n-sum(z[:13]))//(n-13)+1):
for z[14] in range(z[13],(n-sum(z[:14]))//(n-14)+1):
for z[15] in range(z[14],(n-sum(z[:15]))//(n-15)+1):
for z[16] in range(z[15],(n-sum(z[:16]))//(n-16)+1):
for z[17] in range(z[16],(n-sum(z[:17]))//(n-17)+1):
for z[18] in range(z[17],(n-sum(z[:18]))//(n-18)+1):
for z[19] in range(z[18],(n-sum(z[:19]))//(n-19)+1):
for z[20] in range(z[19],(n-sum(z[:20]))//(n-20)+1):
print(z + [n - sum(z)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment