title: How would you take a value from a list and assign it to a variable
body: <p>Just wondering how I could take a value from the list in rolls and assign it to a variable to use within the rest of my code.    </p>
  
  <pre><code>import random
  
  def dice_roll(number):
      if number == 12:
          number = random.randint(1,12)
          print(number)
          return number
      elif number == 6:
          number = random.randint(1,6)
          print(number)
          return number
      else:
          number == 4
          number = random.randint(1,4)
          print(number)
          return number
  
  print("12 sided")
  print("6 sided")
  print("4 sided")
  
  rolls = {4: [], 6: [], 12: []} # dictionary to hold rolls
  while True:
      roll = int(input("Which dice would you like to roll? --&gt; ")) # store die size
      rolls[roll].append(dice_roll(roll)) # roll and add to dictionary
      doRepeat=input("Go again? --&gt; ")
      if doRepeat == "no":
          break 
      print(rolls)
  </code></pre>