How to set the value inside a list in python?
<p>I have 10 dice that are all programmed the same as D1.</p>

<pre><code>D1 = random.randint(1,12)
</code></pre>

<p>I then store them all in a list like this:</p>

<pre><code>roller[DI,D2...]
</code></pre>

<p>A person then  selects the die to keep (in a while loop) and when he wants to roll the remaining dice he ends the loop. The program below successfully loops, however the dice in the list are not changing. What am I missing? </p>

<pre><code> while wanted != "11":
        print("The dice left in your roll:" , roller)
        want = int(input("Select Di by using numbers 0-9.")) 
        di = roller[want]
        del roller [want]
        keep.append(di)
        print("Dice that you have kept:" , keep)
        wanted = input("\nType 11 to roll again. Type anything else to select more dice.\n")
        wanted = "12"
        D1 = random.randint(1,12)
        [... more setting ...]
        D10 = random.randint(1,12)
</code></pre>

<p>However, after setting the dices D1 through D10, the next iteration of my while loop does not reflect a change of value for the roller list. Why is this?</p>
