Arrays
suggest changeIntroduction
A list can hold mixed values, including ints, strings, or other lists. The typecodes below belong to the array module, which stores values of one C type.
Parameters
| Parameter | Details |
|---|---|
b |
Signed integer, 1 byte |
B |
Unsigned integer, 1 byte |
c |
Not a Python 3 typecode. array('c') raises ValueError |
u |
Unicode character, 2 bytes. Deprecated, and scheduled for removal in Python 3.16 |
h |
Signed integer, 2 bytes |
H |
Unsigned integer, 2 bytes |
i |
Signed C int. Minimum 2 bytes; 4 bytes in this Windows build |
I |
Unsigned C int. Minimum 2 bytes; 4 bytes in this Windows build |
w |
Unicode character, 4 bytes |
l |
Signed C long. Minimum 4 bytes; 4 bytes in this Windows build |
L |
Unsigned C long. Minimum 4 bytes; 4 bytes in this Windows build |
q |
Signed integer, 8 bytes |
Q |
Unsigned integer, 8 bytes |
f |
Floating point, 4 bytes |
d |
Floating point, 8 bytes |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents