Learn Create Your Own Split Screen

Next Page

The result might surprise you.

Because do_something_else creates a variable called thing with the local scope of the function, when the function exits, so does the scope for the variable.

There is no global thing. That's why the code produces an error.