title: TypeError: 'list' object cannot be interpreted as an integer
body: <p>The <code>playSound</code> function is taking a list of integers, and is going to play a sound for every different number. So if one of the numbers in the list is <code>1</code>, <code>1</code> has a designated sound that it will play. </p>
  
  <pre><code>def userNum(iterations):
    myList = []
    for i in range(iterations):
      a = int(input("Enter a number for sound: "))
      myList.append(a)
      return myList
    print(myList)
  
  def playSound(myList):
    for i in range(myList):
      if i == 1:
        winsound.PlaySound("SystemExit", winsound.SND_ALIAS)
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <pre><code>TypeError: 'list' object cannot be interpreted as an integer
  </code></pre>
  
  <p>I have tried a few ways to convert the list to integers. I am not too sure what I need to change. I am sure that there is a more efficient way of doing this. Any help would be very greatly appreciated. </p>