-2
print("Blah: [",blah_url,blah,"]<br>", file=f)

Output:

Blah: [ http://blah/Pages/Revision.aspx?projectId=541511cd-86bf-46fc-ae70-aec46e6030c7 blah ]<br>

The additional space after the open bracket "[" and before the close bracket "]" shouldn't be there.

It should look like this:

Blah: [http://blah/Pages/Revision.aspx?projectId=541511cd-86bf-46fc-ae70-aec46e6030c7 blah]<br>

I have confirmed there are no extra spaces in the data being supplied as the input.

Patrick Artner
  • 50,409
  • 9
  • 43
  • 69
KellyH
  • 3
  • 2
  • Yes, the space *should* be there: that's how the `print` function is designed and documented. – Prune Oct 16 '20 at 17:06

1 Answers1

0

The print function automatically adds spaces between each of the parameters. Try this (it overrides the adding of spaces):

print("Blah: [", blah_url, blah, "]", file=f, sep="")

or this (passing it in as one parameter):

print("Blah: [" + blah_url + blah + "]", file=f)
Seth
  • 2,214
  • 1
  • 7
  • 21