It turns out building the following string in python...
# global variables
cr = '\x0d' # segment terminator
lf = '\x0a' # data element separator
rs = '\x1e' # record separator
sp = '\x20' # white space
a = 'hello'
b = 'world'
output = a + rs + b
...is not the same as it may be in C#.
How do I accomplish the same in C#?
".