You are viewing a single comment's thread. Return to all comments →
if __name__ == '__main__': x = int(input()) y = int(input()) z = int(input()) n = int(input()) l_x = range(x+1) l_y = range(y+1) l_z = range(z+1) return_list = [[a, b, c] for a in l_x for b in l_y for c in l_z if a+b+c != n] print(return_list)
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 →