2

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?

1 Answer 1

2

Simply define a variable:

MSG_TERMINATOR = "\0"
1
  • @RishabhSoni: \00 and \0 are both valid octal character specifications, \x00 specifies the value as hexadecimal. See Escape Sequences in C.
    – Blrfl
    Commented Dec 31, 2015 at 12:13

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.