fields:
- STNUM = double
- STRDIR = string
- STRNAME = string
- STRTYPE = string
Tuple and s.format
I have tried:
arcpy.CalculateField_management (newparcelsUTM, "SiteAddress","{0} {1} {2} {3} ".format('!STRNUM!','!STRDIR!','!STRNAME!','!STRTYPE!'),"PYTHON_9.3")
## set variable- str(double) ##
I have tried setting a variable to change the double field to a string:
AddNum = str('!STNUM!')
then use it in the Calculate field line:
arcpy.CalculateField_management (newparcelsUTM, "SiteAddress", AddNum+" "+'!STRDIR!'+" "+'!STRNAME!'+" "+'!STRTYPE!'),"PYTHON_9.3")
All my attempts end with:
ExecuteError: ERROR 000539: SyntaxError: invalid syntax (, line 1) Failed to execute (CalculateField).
I have tried different iterations on this- single quotes v double quotes... it works if I use just the STNUM field. It works if I use any combination of the string fields. It just does not work combining the double field with the string fields! I have read many threads regarding concatenate, Field calculator, combine double with string, on stack exchange and the Esri sites... I have been trying!