How to equally partitioning an array into predefined size and loop folding in Python
<p>I'm using python and try to do 10 folds looping. To explain this problem, I've an array of any size > 10 of any content, for example:</p>

<pre><code>myArray = [12,14,15,22,16,20,30,25,21,5,3,8,11,19,40,33,23,45,65]
smallArray = []
bigArray = []
</code></pre>

<p><strong>I want to do two things:</strong></p>

<ol>
<li>divide "myArray" into 10 equal parts [e.g. part1, part2, ..., part10]</li>
<li>I need to loop 10 times and each time <strong>to do the following:</strong>
<ul>
<li>smallArray = one distinct part a time</li>
<li>the remaining parts are assigned into "bigArray"</li>
</ul></li>
</ol>

<p>and keep doing this for the remaining 10 folds.</p>

<p>the output for example:</p>

<pre><code>Loop1: smallArray = [part1], bigArray[the remaining parts except part1]
Loop2: smallArray = [part2], bigArray[the remaining parts except part2]
...
Loop10: smallArray = [part10], bigArray[the remaining parts except part10]
</code></pre>

<p>How to do so in Python?</p>
