title: Separate sections in Python
body: <p>I was wondering whether there is a <strong>best practice</strong> to separate chunks of code in Python. In MATLAB, for example, two comment signs (<code>%%</code>) create a code section. At the moment, I am doing:</p>
  
  <pre><code>####
  ## Import libraries
  ####
  
  import _mssql #Binary here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymssql
  
  ####
  ## Connect to db + Query the data
  ####
  
  q_file = open ("query.txt", "r")
  query = q_file.read().replace('\n', '')
  
  ##Connect to the database
  conn = _mssql.connect(server='', user='',
                        password='', database='')
  
  ##Query the database
  conn.execute_query(query)
  for row in conn:
      print(row)
  
  ####
  ## Data filtering
  ####
  
  [...]
  </code></pre>