title: How to apply math operations to each number from a list in python?
body: <p>I am a beginner at python (one week). Here I am trying print the list of all the prime factor of 60. But for line 19, I am getting following error:
  <em>TypeError: unsupported operand type(s) for %: 'float' and 'list'</em></p>
  
  <p>The code:</p>
  
  <pre><code>whylist = []
  factor = []
  boom = []
  primefactor = []
  n = 60
  j = (list(range(1, n, 1)))
  
  
  
  for numbers in j:
      if n%numbers == 0:
          whylist.append(numbers)
          for everynumber in whylist:
              factor.append(everynumber)
  
  for things in factor:
      u = (list(range(1, things, 1)))
      d = float(things)
      if d%u == 0:
          boom.append(things)
      if len(boom) == 1:
          for every in boom:
              primefactor.append(every)
  print(primefactor)
  </code></pre>
  
  <p>What am I doing wrong?</p>