I have a folder with a (3) shapefiles. Each shp. has a field titled "country" with a country name. I've already set my desired workspace correctly and everything else in my script works for what I want to do, it's just this part I'm struggling with. What I'm attempting to do is to slice the country name so only the first letter of the country is displayed in the country field for each attribute. So for example, if my first attribute in the country field is Canada, I want to see 'C' instead, if my second row is Portugal, I want to see 'P' etc. I need the loop to go though each shapefile in my folder as you can see. I generally don't have much experience at all using string slicing or string concatenation. My desire is to use an update cursor to accomplish this.
Below is a snippet of my current script attempting to accomplish this.
try: for fc in arcpy.ListFeatureClass(): with arcpy.da.UpdateCursor(fc,["country"]) as cursor: for row in cursor: row =  cursor.updateRow(row) del row, cursor except: print ("Could not complete the string slicing notation.")