파이썬 Python unsubscriptable
다음과 같은 TypeError 컨텍스트에서 unsubscriptable 은 무엇을 의미합니까? TypeError: 'int' object is unsubscriptable 편집하다: 이 현상을 초래하는 짧은 코드 예제입니다. a=[[1,2],[5,3],5,[5,6],[2,2]] for b in a: print b[0] > 1 > 5 > TypeError: 'int' object is unsubscriptable 해결 방법 정수를 배열로 처리하려고 시도했음을 의미합니다. 예를 들면 : a = 1337 b = [1,3,3,7] print b[0] # prints 1 print a[0] # raises your exception 참조 페이지 https://stackoverflow.com/questions/41..
2020. 10. 25.
파이썬 JSONDecodeError : ','구분 기호 예상 : 줄 1 열 43 (문자 42)
나는 이미 여기에서 많은 예를 읽었습니다. 불행히도이 오류가 계속 발생합니다. 오류 : json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 43 (char 42) json 파일 : {"people": [{"name": "Scott", "from": "Nebraska", "website": "stackabuse.com"}, {"name": "Larry", "from": "Michigan", "website": "google.com"}, {"name": "Tim", "from": "Alabama", "website": "apple.com"}]} 및 또 다른 별도의 json 파일 : {"scores":[{"name":"Larry","res..
2020. 10. 25.