title: Python - Combine two lists into one json object
body: <p>I have an executor in Python which addresses 2 functions namely <code>get_tech_courses()</code> and <code>get_music_courses()</code> returning individual lists; 1 and 2 respectively.</p>
  
  <p><strong>List 1.</strong>  </p>
  
  <pre><code>[
  {'title': 'THE COMPLETE PYTHON WEB COURSE', 'downloads': '4', 'views': '88'}, 
  {'title': 'THE COMPLETE JAVA WEB COURSE', 'downloads': '16', 'views': '156'}
  ]
  </code></pre>
  
  <p><strong>List 2.</strong></p>
  
  <pre><code>[
  {'title': 'THE COMPLETE GUITAR COURSE', 'downloads': '18', 'views': '125'}, 
  {'title': 'THE COMPLETE KEYBOARD COURSE', 'downloads': '63', 'views': '98'}
  ]
  </code></pre>
  
  <p>I want to combine both the lists in a json array tied under the parent, <code>courses</code> like this :</p>
  
  <pre><code>{"courses":
  [{'title': 'THE COMPLETE PYTHON WEB COURSE', 'downloads': '4', 'views': '88'}, 
  
  {'title': 'THE COMPLETE JAVA WEB COURSE', 'downloads': '16', 'views': '156'},
  
  {'title': 'THE COMPLETE GUITAR COURSE', 'downloads': '18', 'views': '125'}, 
  
  {'title': 'THE COMPLETE KEYBOARD COURSE', 'downloads': '63', 'views': '98'}]
  }
  </code></pre>
  
  <p><br>
  This is not printing proper json.
  <br></p>
  
  <pre><code>from concurrent.futures import ThreadPoolExecutor
  
  import tech_course
  import music_course
  import json
  
  courses = []
  
  with ThreadPoolExecutor(max_workers=2) as executor:
      courses.append(executor.submit(tech_course.get_tech_course).result())
      courses.append(executor.submit(music_course.get_music_course).result())
  
  print(json.dumps(courses))
  </code></pre>