So as I know the Slice string looking the strings or the integers but here I don't know why exactly I've got that parameter [:-4]. What exactly the python looks, in order to execute the fireDamage Why I need that parameter while I have the path.
import arcpy
arcpy.env.overwriteOutput = True
arcpy.env.workspace = 'C:/gispy/data/ch06'
outDir = 'C:/gispy/scratch/'
fireDamage = 'special_regions.shp'
fireBuffer = outDir + fireDamage[:-4] + 'Buffer.shp'
bufferDist = '1 mile'
park = 'park.shp'
clipOutput = outDir + park[:-4] + 'DamageBuffer.shp'
arcpy.Buffer_analysis(fireDamage, fireBuffer,bufferDist)
print '{0} created.'.format(fireBuffer)
arcpy.Clip_analysis(park, fireBuffer, clipOutput)
print '{0} created.'.format(clipOutput)