Development/Python
[Solved][Python] TypeError: 'NoneType' object is not subscriptable
Best Junior
2020. 3. 17. 14:01
[ 문제 상황 ]
위처럼 None인 변수에서 index 실행시 에러가 발생합니다.
TypeError: 'NoneType' object is not subscriptable
[ 문제 원인 ]
NoneType인 변수에서 index가 불가능하다는 에러 문구입니다.
[ 해결 방법 ]
해당 변수가 정상적인 값을 가지고 있는지 확인해줍니다.