I want to merge 2 lists
List 1 contains 3 index with 4 value in them
List 2 containt 5 index but index 1; 4; 5 is empty
I want to keep index 1 - 4 -5 empty.
So the should end up being
Thanks in advance
You can try this python script:
i think im doing the pythons script wrong any idea?
Indentation matters a lot in Python as it stipulates looping. Please indent lines 18 and 20 as per Tiago’s example
That’s exactly what @ Sol_Amour said.
Holy moly it worked Thanks alot
i have no idea how i got that wrong
just to understand the script a little better, its only using the the 0 right ?
“if item!=0:” ?
so the output would not be corrupted if the value 2 is changed to 3 in the “list map”
Also if the input happend to be “empty list” would it then be possible to replace "if item!= 0: with “if item!= empty list:”
I think this is correct
if item!= :
if len(item)!=0 :
Empty list has not meaning in Python