You are viewing a single comment's thread. Return to all comments →
For me it was harder than an easy challenge but it helped me understand the comprehension list by first coding in for loop:
result = [] for a in range(0, x+1): for b in range(0, y+1): for c in range(0, z+1): if a + b + c != n: result.append([a, b, c])
Seems like cookies are disabled on this browser, please enable them to open this website
List Comprehensions
You are viewing a single comment's thread. Return to all comments →
For me it was harder than an easy challenge but it helped me understand the comprehension list by first coding in for loop: