faqts : Computers : Programming : Languages : Python : Common Problems : Strings

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 6 people (83%) answered Yes
Recently 4 of 5 people (80%) answered Yes

Entry

How can I generate a string with 42 zeros, not the ASCII value but the REAL thing - (0x00)?

Nov 27th, 2007 09:38
jack jill, unknown unknown, Jerome Chan, Thomas Gagne


zero_string = chr(0) * 42
also
'\000' * 42
and
struct.pack('42x')
http://gettravelinsurance.blogspot.com/2007/11/travel-life-insurance.html
http://londontravelguide4u.blogspot.com/2007/11/buckingham-palace.html