title: How to combine multiple try except block in Python?
body: <p>I was reviewing existing code and I found this try except block. This code was part of the unit test code which was taking more time to execute. So I wanted to work on parts where I can efficiently write code to improve performance.</p>
  <p>I have around 10 try except block in my code (pasted few lines of code below for better understanding). Is there a more Pythonic way to combine these try except block for better readability and performance improvement?</p>
  <pre><code>try:
      from X import *
  except ImportError:
      from Y import *
  try:
      from A import *
  except ImportError:
      from B import *
  try:
      from I import *
  except ImportError:
      from J import *
  </code></pre>