About Lesson
Creating empty one-D array:-
Syntax:- from array import *
array_name=array(‘type code’, [])
Type code:-
Sr. No. |
Type code |
C type |
Python code |
Size in byte |
1 |
b |
Signed char |
int |
1 |
2 |
B |
Unsigned char |
int |
1 |
3 |
h |
Signed short |
int |
2 |
4 |
H |
Unsigned short |
int |
2 |
5 |
i |
Signed int |
int |
2 |
6 |
I |
Unsigned int |
int |
2 |
7 |
l |
Signed long |
int |
4 |
8 |
L |
Unsigned long |
int |
4 |
9 |
g |
Signed long long |
int |
8 |
10 |
q |
Unsigned long long |
int |
8 |
11 |
f |
Float |
float |
4 |
12 |
d |
double |
float |
8 |