When creating multiple feature classes using arcpy.CreateFeatureclass (outside of ArcMap and ArcGIS Pro when using IDLE), unexpected locks are placed randomly on the newly created feature classes.
The issue is not reproducible in ArcGIS Pro 2.7 after resolving script errors. Please contact tech support for more info and updated scripts.
解决办法
Run the script in the Python window of ArcCatalog, ArcMap, or ArcGIS Pro. The script runs successfully. This workaround is tested and worked in ArcCatalog 10.6.1, ArcMap 10.5.1 and 10.6.1, and ArcGIS Pro 2.2.4.