Scratch Workspace

A short script with a few inputs and outputs is one thing but when you have a script that performs a series of operations, some outputs are bound to be temporary intermediate outputs. For this reason, I wanted to explore using the scratch workspace in the general environment when formulating a large python script for ArcMap.
I finally found some useful information showing that you can output temporary feature layers like this ...

TMP_OUTPUT = "%SCRATCHWORKSPACE%\\OUTPUT1"

This works just fine for me and when I'm done I'll typically do this sort of thing to clean up the mess.

if arcpy.Exists(TMP_OUTPUT):
     arcpy.Delete_management(TMP_OUTPUT)