Write List comprehensions to produce the following List pattern:
[[2, 3, 4, 5], [3, 4, 5, 6], [4, 5, 6, 7], [5, 6, 7, 8]]
a= [2,3,4,5]
pattern = [ ]
l = [ ]
[pattern.append(i+j) for i in a for j in range(0,4)]
print(pattern)
With this code I could just print the output without putting them in the required pattern. Could someone help me out?