Skip to content

Instantly share code, notes, and snippets.

@ahmed4end
Created July 15, 2020 00:51
Show Gist options
  • Save ahmed4end/ad5b4c515178e96f9634d494b2611991 to your computer and use it in GitHub Desktop.
Save ahmed4end/ad5b4c515178e96f9634d494b2611991 to your computer and use it in GitHub Desktop.
arr = [[-1,1,-7,-8],[-10,-8,-5,-2],[0,9,7,-1],[4,4,-2,1]]
print((lambda n: (lambda x1, x2, y: abs(sum([x1[i] for i in range(0, len(x1), y+1)])- sum([x2[i] for i in range(0, len(x2), y+1)])))(x1=[j for i in n for j in i], x2=[j for i in n for j in i[::-1]], y=len(n[0])))(arr))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment