Thank you so much for your response, however i am not getting the kml file. For some reason its not being saved. please assist
import arcpy
# To allow overwriting the outputs change the overwrite option to true.
arcpy.env.overwriteOutput = False
# Local variables:
Residential__2_ = "Residential"
Residentialbyattribute = Residential__2_
Count = "7"
ResCopiedFeatures = r"C:\Users\SADV\Work\Esri Data\2018\SADV_Res_Coverage\SADV_Res_Coverage.gdb\ResCopiedFeatures"
ResCopiedFeatures_Layer = "ResCopiedFeatures_Layer"
residentialtest_kmz = r"C:\Users\SADV\Documents\ArcGIS\testing\residentialtest.kmz"
# Process: Select Layer By Attribute
arcpy.SelectLayerByAttribute_management(in_layer_or_view=Residential__2_, selection_type="NEW_SELECTION", where_clause="BuildStatus = 'In Progress' And Province = 'WC'", invert_where_clause="")
# Process: Copy Features
arcpy.CopyFeatures_management(in_features=Residentialbyattribute, out_feature_class=ResCopiedFeatures, config_keyword="", spatial_grid_1="", spatial_grid_2="", spatial_grid_3="")
# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(in_features=ResCopiedFeatures, out_layer=ResCopiedFeatures_Layer, where_clause="", workspace="", field_info="OBJECTID OBJECTID VISIBLE NONE;SHAPE SHAPE VISIBLE NONE;Name Name VISIBLE NONE;FolderPath FolderPath VISIBLE NONE;GlobalID GlobalID VISIBLE NONE;Open_Access Open_Access VISIBLE NONE;Status Status VISIBLE NONE;Installation_Fee Installation_Fee VISIBLE NONE;Promotional_Products Promotional_Products VISIBLE NONE;SHAPE_Length SHAPE_Length VISIBLE NONE;SHAPE_Area SHAPE_Area VISIBLE NONE;Site_Account_ID Site_Account_ID VISIBLE NONE;Unique_ID Unique_ID VISIBLE NONE;BuildStatus BuildStatus VISIBLE NONE;Province Province VISIBLE NONE")