I have a simple arrary:
a = [1,2,3,6,7,10,11,12,15,16]
How to fill array missing elements ?
range(min(a), max(a) + 1)
# [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
I have a simple arrary:
a = [1,2,3,6,7,10,11,12,15,16]
How to fill array missing elements ?
range(min(a), max(a) + 1)
# [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
精彩评论