With:
A = [7, 15, 21]
print [i, i+1, i+2 for i in A]
I'd like to get [7, 8, 9, 15, 16, 17, 21, 22, 23]
.
Of course like this it doesn't work, and [[i, i+1, i+2] for i in A]
gives [[7, 8, 9], [15, 16, 17], [21, 22, 23]]
which is not what I want.
What's the pythonic way to do this?