Type conversion?

KraftDiner bobrien18 at yahoo.com
Fri Aug 18 11:32:19 EDT 2006


I have the following code...

import array
len32 = array.array('L')
len16 = array.array('H')

len32.append(0)
len16.append(0)

y = len32[0]
print y.__class__
<type 'long'>
z = len16[0]
print z.__class__
<type 'int'>

how can I change Zs type to long?
Or how how can I change an arrays type?




More information about the Python-list mailing list