로딩
요청 처리 중입니다...

[python] TypeError: 'NoneType' object is not subscriptable

 [python] TypeError: 'NoneType' object is not subscriptable

#python #error #None 안녕하세요 오늘 발생한 에러는 TypeError: 'NoneType' object is not subscriptable 인데요. 이 에러가 발생하게 된 이유는 'None'타입인 값에 index로 접근하려해서 발생했습니다. a = None print(a[0]) TypeError: 'NoneType' object is not subscriptable 위와 같은 에러가 발생하게 되죠.

이를 해결하기 위해서는 a에 None말고 리스트나 문자열을 넣어주시면 됩니다. 여러분의 코드에 따라 수정해야할 것이 다를것으로 보입니다.

감사합니다....

[python] TypeError: 'NoneType' object is not subscriptable에 대한 요약내용입니다.

자세한 내용은 아래에 원문링크를 확인해주시기 바랍니다.

# error # None # python