Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Memory-allocation/Python/memory-allocation.py
Normal file
15
Task/Memory-allocation/Python/memory-allocation.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
>>> from array import array
|
||||
>>> argslist = [('l', []), ('c', 'hello world'), ('u', u'hello \u2641'),
|
||||
('l', [1, 2, 3, 4, 5]), ('d', [1.0, 2.0, 3.14])]
|
||||
>>> for typecode, initializer in argslist:
|
||||
a = array(typecode, initializer)
|
||||
print a
|
||||
del a
|
||||
|
||||
|
||||
array('l')
|
||||
array('c', 'hello world')
|
||||
array('u', u'hello \u2641')
|
||||
array('l', [1, 2, 3, 4, 5])
|
||||
array('d', [1.0, 2.0, 3.1400000000000001])
|
||||
>>>
|
||||
Loading…
Add table
Add a link
Reference in a new issue