How to format a string from an array?

Allen pruyu.chen at gmail.com
Wed Jun 13 05:11:27 EDT 2007


a = range(256)
I want to output the formated string to be:
00 01 02 03 04 05 06 07   08 09 0a 0b 0c 0d 0e 0f
10 11 12 13 14 15 16 17   18 19 1a 1b 1c 1d 1e 1f
........................................................................
f0 f1 f2 f3 f4 f5 6 f7   f8 f9 fa fb fc fd fe ff

How to do it?




More information about the Python-list mailing list