merge lists alternating

hey guys!
i want to merge two lits alternating...

list1 = [0,2,4,6]

list2 = [1,3,5]

??how would the merging-script (python) look like??

(deisred):    merge_list =[0,1,2,3,4,5,6]

thank you guys!

Load Previous Replies
  • up

    Marios Tsiliakos

    Hello maxK,

    I am nor sure whether my solution is good for you to learn. But is only 3 lines of code. See the attached.

    best,

    M.

    EDIT: Now that I think about it, ignore my solution. It complicates things. Djordje's one is more appropriate for your progress

    • up

      Hannes Löschke

      Any reason for using python on this task?

      There's a native component for exactly that task.

      5
    • up

      Ralph Zoontjens

      All you need is Weave.

      It puts together two lists in alternating fashion or according to a pattern, similar to an inverse of the Dispatch component.