Skip to content

Instantly share code, notes, and snippets.

@isezen
Created April 14, 2019 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isezen/baa46c221023245f35174f8f49727989 to your computer and use it in GitHub Desktop.
Save isezen/baa46c221023245f35174f8f49727989 to your computer and use it in GitHub Desktop.
def _split_n(x, n):
y = [x // n for i in range(n)]
for i in range(x % n):
y[i] += 1
return y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment