title: Creating a struct in python
body: <p>Currently I am porting a pascal program to python, and there I have the following code:</p>
  
  <pre><code>ScanList  = Record
                              name    : string;
                              I       : Integer;
                              Lower,
                              Upper   : Array [1..20] of real;
                              step    : Array [1..20] of real;
                              counts  : Array [1..20] of Integer;
                             Pol     : Array [1..20] of Integer;
                              AverageNo: Array[1..20] of Integer;
                              Average : Array [1..20] of AveMode;
  
                              selected: Array [1..20] of Boolean;
                              saved,
                              loaded,
  
                              altered : Boolean;
  
                          end;
  </code></pre>
  
  <p>I already rewrote most of it into python, thus it looks now like this:</p>
  
  <pre><code>ScanList  = Record
          name = "Hello"
          I = 0
          Lower = [0 for i in range(20)]
          Upper = [0 for i in range(20)]
          step  = [0 for i in range(20)]
          counts = [0 for i in range(20)]
          Pol   = [0 for i in range(20)]
          AverageNo = [0 for i in range(20)]
          Average  = [0 for i in range(20)]
  
          selected = [0 for i in range(20)]
          saved = True
          loaded = True
  
          altered = True
      end
  </code></pre>
  
  <p>But now my problem is, that I want to have it as a struct (as in the old pascal code). I already have seen this question: <a href="https://stackoverflow.com/questions/35988/c-like-structures-in-python">C-like structures in Python</a>, but in this question I do not have arrays, but in mine I have. How can I port the code above into a struct?<br>
  Thank you!</p>