title: Python - Waiting untill a number of operations are done in concurrent.futures
body: <p>This is why I try to do using python and concurrent.futures library.</p>
  <p>Assume that you have a dictionary input as :</p>
  <pre><code>input = {'1': {'Joe','Sal', 'Murry','Q}}, {'2':{'Dana','White'}},{'3':{'ice','cream','water','cola','Butter'}}
  </code></pre>
  <p>The function that will be run in the executors will only take one parameter. something like :</p>
  <pre><code>def printMyInput(mystring):
      print(mystring)
  </code></pre>
  <p>so the specification is that you can run the set in <code>input['1']</code> parallel.</p>
  <pre><code>with concurrent.futures.ProcessPoolExecutor() as executor:
     results = [executor.sumbit(printMyInput, x) for x in input['1'])
  </code></pre>
  <p>This is done only for <code>input['1']</code>. for running <code>input['2']</code> the processes for <code>input['1']</code> has to be done first. and for <code>input['3']</code> the processes for <code>input['2']</code> needs to be done and so on. I can not come up with a way of doing that. and I really need some help.</p>