<div>I would like to use a try except&nbsp;to see if a value exists.&nbsp; But, when I use the following, if a does not exist it exits.&nbsp; I understand why this does this, but is there a way to get b,c, and d if a does not exist without using a try except for every statement?</div>

<div>&nbsp;</div>
<div>try:</div>
<div>&nbsp;&nbsp;&nbsp; fo.write(&quot;a = %s\n&quot; %plan.a)<br>&nbsp;&nbsp;&nbsp; fo.write(&quot;b = %s\n&quot; %plan.b)<br>&nbsp;&nbsp;&nbsp; fo.write(&quot;c = %s\n&quot; %plan.c)<br>&nbsp;&nbsp;&nbsp; fo.write(&quot;d = %s\n&quot; %plan.d)<br>except AttributeError:</div>
<div>&nbsp;&nbsp;&nbsp; pass</div>
<div><br>-- <br>&quot;Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. &quot; &nbsp;-Albert Einstein<br></div>