You can get an XY pair (start and end) by doing this:arcpy.CalculateField_management("Line.shp", "FromXY", "(!SHAPE.firstpoint!)", "PYTHON")
arcpy.CalculateField_management("Line.shp", "ToXY", "(!SHAPE.lastpoint!)", "PYTHON")
To get the Z value you need, you'd probably want to do something more like this:arcpy.CalculateField_management("Line.shp", "FromX", "(!SHAPE.firstpoint.X!)", "PYTHON")
arcpy.CalculateField_management("Line.shp", "FromY", "(!SHAPE.firstpoint.Y!)", "PYTHON")
arcpy.CalculateField_management("Line.shp", "FromZ", "(!SHAPE.firstpoint.Z!)", "PYTHON")
arcpy.CalculateField_management("Line.shp", "ToX", "(!SHAPE.lastpoint.X!)", "PYTHON")
arcpy.CalculateField_management("Line.shp", "ToY", "(!SHAPE.lastpoint.Y!)", "PYTHON")
arcpy.CalculateField_management("Line.shp", "ToZ", "(!SHAPE.lastpoint.Z!)", "PYTHON")