I am having a problem in migrating from Vbscript to Python for ArcGIS Pro.

Building 5, Street 6

What is wrong in this expression?

"{}:{}:{}:{}:{}:{}".format("Building ",!Building_Number!," , ",!Street_Type!), " " ,!Street_Number!
  • 1
    Where precisely are you using this expression? – PolyGeo Jun 17 at 7:50

First glance - it looks like your parentheses in the wrong place:

"{}:{}:{}:{}:{}:{}".format("Building ",!Building_Number!," , ",!Street_Type!, " " ,!Street_Number!)
  • 1
    This would return a string of values separated by colons. – smiller Jun 17 at 21:32

Try Code Block:

def bs(bnumber, stype):
    return "Building {0}, Street {1}".format(bnumber,stype)

Call with:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.