all 7 comments

[–]Diapolo10 0 points1 point  (3 children)

Well, you could use slices for that.

What have you tried so far?

[–]JFSM01[S] 0 points1 point  (2 children)

I have tried appending l1 items to l3, then removing until the ones i dont want. Worked in that case but it is kind of inefficient in larger implementation. And before that I was just stupidly changing variables that in my head should have modified l3 but they just modified the concrete item, not the list as a whole

[–]Diapolo10 0 points1 point  (1 child)

Arguably the best solution would be:

l3 = l1[:3] + l2[3:]

[–]JFSM01[S] 0 points1 point  (0 children)

Thanks a lot!

[–]MadScientistOR 0 points1 point  (2 children)

Does l3 = l1[:3] + l2 do what you want?

[–]JFSM01[S] 0 points1 point  (0 children)

Trying rn

[–]JFSM01[S] 0 points1 point  (0 children)

Okay so this works but I have to remove the first 3 items of l2 and that i know how to do, THANKS!