I want one long list, say [1,2,3,4,5,15,16,17,18,19] as an example. To initialize this, I try typing:
new_list = [range(1,6),range(15,20)]
Just unpack range values as follows:
>>> new_list = [*range(1,6),*range(15,20)] >>> new_list [1, 2, 3, 4, 5, 15, 16, 17, 18, 19] >>> len(new_list) 10