Python might have changed since this was written, but on my machine, with any number, it finishes in 0.0s!
My understanding was that to access a variable, python does a dictionary lookup to match the name to a memory location, which would explain what happens with an older python.