title: Python: Integrate the number of columns into a variable
body: <p>I am new to python and could need your help.</p>
  <p>I have the variable 'sequence' which shows the optimal order of products.</p>
  <pre><code>sequence = seq_2  
  </code></pre>
  <p>with for example:</p>
  <pre><code> seq_2 = [[0, 0], [1, 0]] 
   seq_4 = [[0, 0, 0, 0], [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0]]  
  </code></pre>
  <p>What I want to do is to change the '2' according to the number of columns of a matrix I have generated.
  For example, if the matrix has 6 columns (= 6 products), the variable should be:</p>
  <pre><code>  sequence = seq_6
  </code></pre>
  <p>I know that the number of columns can be generated with:</p>
  <pre><code>columns = len(df.columns)
  </code></pre>
  <p>But how to combine the result to  my &quot;sequence&quot;-varible?</p>
  <p>Best regards
  Amy</p>