Like in perl we do:
use constant MSG_TERMINATOR => "\0";
where MSG_TERMINATOR is a variable.
What is the way of do the same in python?
Simply define a variable:
MSG_TERMINATOR = "\0"
\00
and \0
are both valid octal character specifications, \x00
specifies the value as hexadecimal. See Escape Sequences in C.