Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) 

[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import array

>>> arr = array.array('i', range(5))

>>> print(arr)

array('i', [0, 1, 2, 3, 4])


저건 터미널에서 직접 한거고


Traceback (most recent call last):
File "/Users/hwatotbul/Documents/Lecture/array.py", line 17, in <module>
import array
File "/Users/hwatotbul/Documents/Lecture/array.py", line 21, in <module>
arr = array.array('u', str)
TypeError: 'module' object is not callable


이건 vscode 에서 한거임 맥용 vscode는 파이썬 array는 임포트안되셈? ㅜㅜ



vscode만 안댐. 섭라인, 파이참, idle에선 되셈 ㅜㅜ