Generating a string of NULL bytes

Jerome Chan eviltofu at rocketmail.com
Tue Aug 8 23:39:44 EDT 2000


In article <3990BFB1.1281A1ED at ix.netcom.com>, Thomas Gagne 
<tgagne at ix.netcom.com> wrote:

> I need to generate a string with 42 zeros--and I'm not talking about the 
> ASCII
> value for 0 either (x30), I'm talking about the REAL thing, (0x00).  I 
> guess
> I'm expecting there's probably a string function that takes some 
> formatting
> character (like struct.pack) and returns the string?
> 

zero_string = chr(0) * 42



More information about the Python-list mailing list