[Python] 'builtin_function_or_method' object is not subscriptable 에러 해결하기

2022. 3. 15. 01:30Study/Python

반응형

 

TypeError: 'builtin_function_or_method' object is not subscriptable

다음과 같이 타입에러가 발생한다.

 

파이썬은 변수형태가 없지만 사실은 존재한다.

 

다음과 같은 상태에서 발생한다.

#print(2) ----- o
print[2] ----- x

 

소괄호()와 대괄호[]를 잘 구분하자.

 

 

 

반응형