Deleting multiple variables each pass of a loop <p>In the main loop of my program, I have around a dozen variables that are calculated each time the loop is actioned. At this stage I would prefer a 'NameError' than to have the variables from an earlier pass affect the outcome of a future pass of the loop.</p> <p>Right now I just have a series of the following statements run at the final step of each loop:</p> <pre><code>try: del my_var1 except: pass </code></pre> <p>I suspect there's a better way to do this?</p>