반응형 2017/1118 [파이썬] 파이썬 에러 IndentationError: expected an indented block 안녕하세요 한주현입니다. 오늘은 파이썬 스크립트 작성 시 자주 보게되는 오류 중 하나인, IndentationError: expected an indented block 에 대하여 알아보겠습니다. 문제 상황 IndentationError: expected an indented block 기분 좋게 스크립트를 아래와 같이 작성한 다음 실행을 시켰더니.. 1234def hello():print("Hello World!") hello()cs 아래와 같이 오류가 났습니다.. ㅠㅠ 12345$ python helloworld.py File "helloworld.py", line 2 print("Hello world") ^IndentationError: expected an indented blockcs 무슨 일일.. 2017. 11. 1. [파이썬] 파이썬 에러 IndexError: list index out of range 안녕하세요 한주현입니다. 오늘은 파이썬 스크립트 작성 시 자주 보게되는 오류 중 하나인, IndexError: list index out of range 에 대하여 알아보겠습니다. 문제 상황 IndexError: list index out of range 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 >>> lst = [1,2,3] >>> lst [1, 2, 3] >>> lst[0] 1 >>> lst[1] 2 >>> lst[2] 3 >>> lst[3] Traceback (most recent call last): File "", line 1, in IndexError: list index out of range >>> Colored by Color Scripter cs 파이썬 뿐만 아니.. 2017. 11. 1. 이전 1 2 3 4 5 다음 반응형