title: del or listl.remove dont work python 3.5
body: <p>This programm have to order a list of numbersbut every time i become a error can you help me to fix it? I hope somebody has an idea. I hzave also tried to us del list[(thenumber of the element or the number)]</p>
  
  <pre><code># list = list with the none ordert number
  # newlist = with the ordert numbers
  # pnumbver = privious number
  # add = new number for list
  # numberelemente = how many numbers get in list
  # length = length of list
  # i = counting up for the stop
  
  
  
  
  from random import randint
  
  list = []
  newlist = []
  numberelemente = 10
  while numberelemente &gt; 0:
      add = randint(-100, 100)
      list.append(add)
      numberelemente = numberelemente - 1
  
  print(list)
  
  pnumber=list[0]
  length = len(list)
  i = 0
  
  
  while i &lt; length:
      for zahl in list:
         if number &lt; pnumber:
              pnumber = number
      list.remove(pnumber)
      newlist.append(pnumber)
      i = i+1
  
  print(newlist)
  </code></pre>
  
  <p>but i become this error i become them every time</p>
  
  <pre><code>eenter code her&gt;&gt;&gt; runfile('C:/Users/Max/Desktop/python/liste ordnen.py', wdir='C:/Users/Max/Desktop/python')
  [89, 46, 68, -30, 93, 38, -73, 91, 33, -69]
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Users\Max\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
      execfile(filename, namespace)
    File "C:\Users\Max\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
      exec(compile(f.read(), filename, 'exec'), namespace)
   File "C:/Users/Max/Desktop/python/liste ordnen.py", line 29, in &lt;module&gt;
      list.remove(vzahl)
  ValueError: list.remove(x): x not in list
  </code></pre>