<reponame>PacktPublishing/Mastering-ArcGIS-Enterprise-Administration<filename>Chapter10/10_03_print_statements.py<gh_stars>1-10
import arcpy

result = arcpy.GetCount_management(
    r"C:\Projects\GDBs\Sandbox.gdb\StudyAreas"
)
record_count = int(result.getOutput(0))
if record_count > 0:
    arcpy.FeatureClassToFeatureClass_conversion(
        r"C:\Projects\GDBs\Sandbox.gdb\StudyAreas",
        r"C:\Projects\GDBs\Sandbox.gdb",
        "ActiveStudyAreas"
    )

import arcpy

result = arcpy.GetCount_management(
    r"C:\Projects\GDBs\Sandbox.gdb\StudyAreas"
)
record_count = int(result.getOutput(0))
if record_count > 0:
    arcpy.FeatureClassToFeatureClass_conversion(
        r"C:\Projects\GDBs\Sandbox.gdb\StudyAreas",
        r"C:\Projects\GDBs\Sandbox.gdb",
        "ActiveStudyAreas"
    )