lamar_air wrote: >I need an if statement to test if a variable exists in a pyton script > >eg. if var1 exists: > do this > else: > do this > If it's in a dictionary you can do this: var1.get('key','not found') ( just learned that all of 2 minutes ago ;] )