-
Notifications
You must be signed in to change notification settings - Fork 438
for-loops
#297
What if you used for-loops only to address data structures with known size during compilation.
for example:
`sm = 0
mat = [
[1, 2],
[3, 4],
]
for i in range(len(mat)):
for j in range(len(mat[0])):
sm += mat[i][j]
print(sm)`
Could you turn this into (mat[0][0] + mat[0][1]) + (mat[1][0] + mat[1][1])?
Do you think that it would be useful?
Would it bloat the executable too much?
All reactions
-
👀 1
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment