sep=''
in the context of a function call sets the named argument sep
to an empty string. See the print()
function; sep
is the separator used between multiple values when printing. The default is a space (sep=' '
), this function call makes sure that there is no space between Property tax: $
and the formatted tax
floating point value.
Compare the output of the following three print()
calls to see the difference
>>> print('foo', 'bar')
foo bar
>>> print('foo', 'bar', sep='')
foobar
>>> print('foo', 'bar', sep=' -> ')
foo -> bar
All that changed is the sep
argument value.
in a string literal is an escape sequence for tab character, horizontal whitespace, ASCII codepoint 9.
is easier to read and type than the actual tab character. See the table of recognized escape sequences for string literals.
Using a space or a
tab as a print separator shows the difference:
>>> print('eggs', 'ham')
eggs ham
>>> print('eggs', 'ham', sep='')
eggs ham
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…