As Eli said, Python doesn't require variable declaration. In C you would say:
int x;
if(something)
x = 1;
else
x = 2;
but in Python declaration is implicit, so when you assign to x it is automatically declared. It's because Python is dynamically typed - it wouldn't work in a statically typed language, because depending on the path used, a variable might be used without being declared. This would be caught at compile time in a statically typed language, but with a dynamically typed language it's allowed.
The only reason that a statically typed language is limited to having to declare variables outside of if
statements in because of this problem. Embrace the dynamic!