title: Python Program Freezes computer
body: <p>I have been programming in python for a little while now, and decided to teach my friend as well. I asked him to make a method that would return a list of all the factors of a number, he gave me a script that was a little inefficient but still looked like it should have worked to me. However when run the program freezes up both my and his computer (I have a top of the line gaming pc so I don't think it is using to many resources). I showed him how to fix it, however I still cannot pinpoint what is causing the problem. Here is the code, thanks for your time!</p>
  
  <pre><code>def factors(numb):
      facs = []
      for i in range(1,int(numb // 2)):
          if numb % i == 0:
              facs.append(i)
      for i in facs:
          facs.append((numb / i))
      return facs.sort()
  </code></pre>
  
  <p>p.s. it never throws an error, even after having been let run for a while. Also it is in python 3.4</p>