title: Python TypeError: 'int' object is not iterable
body: <p>The following code is giving me error Python </p>
  
  <p><code>TypeError: 'int' object is not iterable:</code></p>
  
  <p>Code:</p>
  
  <pre><code>hosts = 2
  AppendMat = []
  Mat = np.zeros((hosts,hosts))
  Mat[1][0] = 5
  for i in hosts:
      for j in hosts:
          if Mat[i][j]&gt;0 and Timer[i][j]&gt;=5:
              AppendMat.append(i)
  </code></pre>
  
  <p>How could I fix the error - </p>
  
  <pre><code>TypeError: 'int' object is not iterable?
  </code></pre>
  
  <p>Secondly how can I append both the values of i and j if the if condition is true? Here I'm trying to append i only.</p>