Q:

python 3 position change in a list with user input

Okay, so I'm kind of lost here. I understand how to insert a value into the code myself [Example - x.insert(2, 99)] but what I'm getting hung up on is what happens if I'm trying to get the user to tell me where they want the item to be in regards to position in the list.
Example
inventory = [dagger, sword, shield, breastplate, helmet]
this is what I have and I know it doesn't work.
def edit_it():
    inventory = ["orb", "staff", "spellbook", "hat", "potion", "robe"]
    inventory[item] = input("Number: ")
    print(inventory)

I just want it to show an updated position list if the user wanted to move say, the spellbook to the front, thus pushing back all other items. I've been at this all day and I'm spent. Help?

A:

How about something like this:
item= int(input("Number: "))
inventory.insert(0,inventory.pop(item))

*This works on python 2, and python 3

