I have a list:
nums = [0, 1, 2, 3]
what I would like to do is loop though this list but then change the list. Basically when I loop through nums = [0, 1, 2, 3] nums would need to change to:
nums = [current_element, 0, 1, 2]
nums = [0, current_element, 1, 2]
nums = [0, 1, current_element, 2]
nums = [0, 1, 2, current_element]
Is there a way of changing nums like this? I feel like there is a simple solution to this, but I've been stumped for hours.