Python file read line startswith to endswith and move to list : <p>i have file like below:</p>

<pre><code>=======
line1 contents
line2 contents
line3 contents
=======
=======
line4 contents
line5 contents
=======
=======
line6 contents
line7 contents
=======
</code></pre>

<p>Read file contents that startswith ======= to endswith =======. Send output to list.</p>

<p>Below is expected output for list of list </p>

<pre><code> [["line1 contents", "line2 contents", "line3 contents"],
  ["line4 contents", "line5 contents"],
  ["line6 contents", "line7 contents"]]
</code></pre>
