title: reading CSV file and inserting it into 2d list in python
body: <p>I want to insert the data of CSV file (network data such as: time, IP address, port number) into 2D list in Python.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import csv
  datafile = open('a.csv', 'r')
  datareader = csv.reader(datafile, delimiter=';')
  data = []
  for row in datareader:
      data.append(row)    
  print (data[1:4])
  </code></pre>
  
  <p>the result is:</p>
  
  <pre><code>[['1', '6', '192.168.4.118', '1605', '', '115.85.145.5', '80', '', '60', '0.000000000', '0x0010', 'Jun 15, 2010 18:27:57.490835000', '0.000000000'], 
  ['2', '6','115.85.145.5', '80', '', '192.168.4.118', '1605', '', '1514', '0.002365000', '0x0010', 'Jun 15, 2010 18:27:57.493200000', '0.002365000'], 
  ['3', '6', '115.85.145.5', '80', '', '192.168.4.118', '1605', '', '1514', '0.003513000', '0x0018', 'Jun 15, 2010 18:27:57.496713000', '0.005878000']]
  </code></pre>
  
  <p>But it is just one dimension and I don't know how to create 2D array and insert each element into the array.</p>
  
  <p>Please suggest me what code should I use for this purpose. (I looked the previous hints in the website but none of them worked for me)</p>