I am trying to create a new script with a hard-coded geodatabase filename, that lists the feature classes it contains to the console. I know there are several ways to do this, but I decided to to use ListFeatureClasses function. I barely started studying Python, so I know very basic stuff, but I would like to get help with this.
I tried the following code, but it does not print anything and does not even give me any error message. I opened up ArcGIS Pro, added the geodatabase to my map, and wrote this code in the built-in Python console. Is there any step I am missing or something wrong with my code?
import arcpy import os arcpy.env.workspace = "X:\311\Obtaining GIS Data\TaxParcels.gdb" datasets = arcpy.ListDatasets(feature_type='feature') datasets = [''] + datasets if datasets is not None else  for ds in datasets: for fc in arcpy.ListFeatureClasses(feature_dataset=ds): path = os.path.join(arcpy.env.workspace, ds, fc) print(fc)