Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This solution uses a while loop that continues until lst_one is empty. The i variable is used to keep track of the current index in lst_one. The % operator is used to wrap around the list if iterable is greater than the length of lst_one. The current element is then appended to lst_two and removed from lst_one. The iterable variable is incremented by 1 after each iteration.
- I hope this helps! Let me know if you have any questions.
Advertisement
Add Comment
Please, Sign In to add comment