CPython compiles to bytecode, turning all local variable references into offsets into a local variable array. So, getting the "str" function requires a global name lookup, while getting your local "lstr" only requires an array lookup with a constant embedded in the bytecode.
You can have a lot of fun playing with the dis module to look at the bytecode that Python generates for your functions:
You can have a lot of fun playing with the dis module to look at the bytecode that Python generates for your functions:
http://docs.python.org/library/dis.html