초보자에게 많은 파이썬 에러 10선
1) if, elif, else, for, while, class, def의 끝에 추가하는 것을 잊었다.
오류 팁: SyntaxError: invalid syntax
오류는 다음 코드에서 발생합니다.

2) "="와 "=="의 사용
오류 팁: SyntaxError: invalid syntax
「=」는 대입 연산자이고, 「==」는 비교 연산이다. 오류는 다음 코드에서 발생합니다.

3) for 루프에서 len ()을 호출하는 것을 잊었습니다.
오류 팁: TypeError: ‘list’ object cannot be interpreted as an integer
일반적으로 인덱스에서 list 또는 string 요소를 반복합니다. 이렇게 하려면 range() 함수를 호출해야 합니다. 이 목록을 반환하는 대신 len 값을 반환하는 것을 잊지 마십시오. 오류는 다음 코드에서 발생합니다.

4) 문자열 값 변경
오류 팁: TypeError: ‘str’ object does not support item assignment
string은 불변의 데이터형이며, 에러는 다음의 코드로 발생합니다.

5) 문자열 이외의 값을 문자열에 연결
오류 팁: TypeError: Can’t convert ‘int’ object to str implicitly
오류는 다음 코드에서 발생합니다.

6) 문자열의 시작과 끝에 '''를 추가하는 것을 잊었습니다.
오류 팁: SyntaxError: EOL while scanning string literal
오류 다음 코드에서 발생합니다.

7) 변수 이름으로 Python 키워드를 사용
오류 팁: SyntaxError: EOL while scanning string literal
Python 키워드는 변수 이름으로 사용할 수 없습니다. 이 오류는 다음 코드에서 발생합니다.

8) 메소드 이름의 철자가 잘못되었습니다.
오류 팁: AttributeError: ‘str’ object has no attribute ‘lowerr’
이 오류는 다음 코드에서 발생합니다.

9) 참조가 목록의 최대 인덱스를 초과함
오류 팁: IndexError: list index out of range
이 오류는 다음 코드에서 발생합니다.

10) range()를 사용하여 정수 목록을 만듭니다.
range()는 실제로 list 값이 아니라 'range object'를 반환한다는 것을 기억해야합니다.
오류 팁: TypeError: ‘range’ object does not support item assignment
이 오류는 다음 코드에서 발생합니다.

Reference
이 문제에 관하여(초보자에게 많은 파이썬 에러 10선), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ScrapeStorm-JP/items/a347942a23ba4d7be95f텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)