My requirement is l1 should be fixed length & l2 length will be vary dynamically.
l1 = [None] * 24
l2 = [1,2,3,4,5,6,7,8,9,10]
(or)
l2 = [1,2,3,4,5]
(or)
l2 = list(range(40))
Now I need to append or insert the second list or array from the starting position. My final output expected as below ( Means after append or insert the L1 length always 24)
Case 1:
l1 = [1,2,3,4,5,6,7,8,9,10, None, None, None, None, None, None, None, None, None, None, None, None, None, None]
Case 2:
l1 = [1,2,3,4,5,None, None,None, None,None None, None, None, None, None, None, None, None, None, None, None, None, None, None]
Case 3:
(Ignore after 24th index)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
Is there any optimal solution using python list or numpy array or any other lib?