title: Can I get the string of on of the asserts in a try-except blcok?
body: <p>I want to check a group of input, and if any one of them is illegal, I throw a error and make a warning, so I want to make the warning more customed to figure out which one is wrong.</p>
  
  <pre><code>try:
      assert input1&lt;1 something like this, "input1 error xxx"
      assert input2 xxx, "input2 error xxx"
      xxxx
  except AssertionError:
     make a warning dialog using the assert infomation
  except:
     pass
  else:
     pass
  </code></pre>
  
  <p>Is it possible? I think I can avoid multiple try-except blocks or if blocks, is there a pythonic way to do it? Thank you in advance.</p>
  
  <p>Get it. Thank you for your help. Assert <strong>should not use for test</strong>. I will modify my code now.</p>