1

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!
0

2 Answers 2

7

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

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

Try Code Block:

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

Call with:

bs(!Building_number!,!Street_Type!)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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