Noob here, Okay so i want to append each integer generated from "range(3,20)" to another similar range "range(22,40)
from itertools import chain
L1 = 3
H1 = 20
L2 = 22
H2 = 40
new_list = [x for x in chain(range(L1,H1))]
new_list2 = [xx for xx in chain(range(L2,H2))]
print (new_list + new_list2)
Results should be:
322
323
324
325...
422
423
424
425...
Current results from above code:
[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]