#i not equal 2 and j not equal 3
list = [[i, j, k] for i in range(1, 4) if i != 2 \
for j in range(2, 5) if j != 3 for k in range(3, 6)]
#method 1
#for j in range(2, 5, 2) for k in range(3, 6)] #using step to jump the j range(2, 5) = 2, 3, 4, jump 3.
#method 2
#for j in range(2, 5, 2) for k in range(3, 6) if not j == 3] #or j!=3
print(list)