AnsweredAssumed Answered

string format question

Question asked by hadpadmasiri on Sep 17, 2014
Latest reply on Sep 17, 2014 by curtvprice

dear sir

 

a ="BOUND-B-GEN"

env.workspace = r"E:\Gampaha\51027202\CM51027202.gdb\CM51027202"

newName = arcpy.AddFieldDelimiters(env.workspace, "PCL_LN_DL")

 

 

I want to format following style

"PCL_LN_DL" = 'BOUND-B-GEN'

 

 

I tried to format following way

where = newName + '=' + '{0}{1}{2}'.format ('\'',str(a),'\'')

 

 

But it gives me wrong result, how to add single quote around BOUND-B-GEN

pl help me.

 

 

Thanks

 

 

Padmasiri

Outcomes