As the question stated, I have one list contains x elements. For example the x is 4:
first_data = [1, 2, 3, 4]
I want to construct another list with a fix size of 8. This list will contain whatever first_data have. If the first_data do not have 8 elements, the rest of the elements will be 0.
Example:
final_data = [1, 2, 3, 4, 0, 0 ,0, 0]
So far I have tried different methods but it didn't work.
How can I achieve this? Thanks and appreciate if any helps!