How to convert a list by mapping an element into multiple elements in python?
<p>For example,
how to convert [1, 5, 7] into [1,2,5,6,7,8] into python?
[x, x+1 for x in [1,5,7]] can't work for sure...</p>

<p>If you just want to fill the list with the numbers between the min and max+1 values you can use <code>[i for i in range (min(x),max(x)+2)]</code> assuming <code>x</code> is your list.</p>

python