I'm trying to do a loop for select and export layers by attribute and name them based on the field value. I've written the script below and it creates the shapefiles which picks up field values as shapefiles' name but they are empty output shapefiles. looks like the query in the select process isn't run.
arcpy.env.workspace = r'C:\temp'
# Create the search cursor
cursor = arcpy.SearchCursor('fc', '')
# Iterate through rows in cursor
for row in cursor:
outfc=r'C:\temp\test'+"\\"+str("{0}".format(row.Project))
arcpy.Select_analysis("fc",outfc,'"Project"=\'"{0}".format(row.Project)\'')
### Project is the field name which is a String.