using builtin array

shama.bell at gmail.com shama.bell at gmail.com
Wed Jun 1 11:53:03 EDT 2005


Is it possible to join/append 2 arrays defined with different
typecodes?

What typecode should i use to generate the following output.

data1 = array('h', '\0', 6)
data2 = array('L', '\0', 25)

for i in range( 6):
    data1[0] = 0xFF
    data2[1] = 0x00
    data1[2] = 0x00
    data1[3] = 0x00
    data1[4] = 0x00
    data1[5] = 0x00

for i in range( 2):
    data2[0] = 0xF0F0F0F0
    data2[1] = 0xFFFFFFFF

Output should be...
(0xFF 0x00 0x00 0x00 0x00 0x00 0xF0F0F0F0 0xFFFFFFFF)

Thank You,
-SB




More information about the Python-list mailing list