title: Loop through python array, set specific values to a specified column
body: <p>I have tried many things but still stuck. This is mostly because I'm failing to understand how python loops through an array or what options I have to loop through it.</p>
  
  <p>I want to build an array: 4 columns, 18 rows.</p>
  
  <p>I need the first column of each row to be a persons name in the person_list. Every 3 rows of my array I would then increment to the next person. </p>
  
  <p>It would seem that my loop is not looping through the array the way I intended. It seems that it sets all values in the first column equal to the person_list value.</p>
  
  <pre><code>person_list = ["person1", "person2","person3","person4","person5","person6"]
  my_array = [[0]*4]*len(person_list)*3
  
  i=0
  j=1
  for row in my_array:
      while j &lt;= 3:
          row[0] = person_list[i]
          j+=1
      j=1
      i+=1
  
  </code></pre>
  
  <p>So the goal would be the resulting array</p>
  
  <pre><code>[
  ["person1", 0, 0, 0],
  ["person1", 0, 0, 0],
  ["person1", 0, 0, 0],
  ["person2", 0, 0, 0],
  ["person2", 0, 0, 0],
  ["person2", 0, 0, 0],
  ["person3", 0, 0, 0],
  ["person3", 0, 0, 0],
  ...
  ]
  </code></pre>