파이썬에서 아무것도 안 하기 (pass)
파이썬에서 아무것도 하지 않는 방법입니다. pass를 사용합니다. 예를 들어 try/except 구문에서 예외가 발생했을 때 아무것도 하지 않고 넘어가고 싶다면 아래의 예시처럼 해 볼 수 있겠습니다.
x = [10, 20]
try:
x.pop(2)
except:
pass
리스트 x의 원소가 2개이므로 pop()에서 2번 인덱스를 지정하면(인덱스는 0부터 시작) "index out of range" 예외가 발생합니다만, pass 명령만 있으므로 아무런 작업도 하지 않고 넘어갑니다.
@joviansummer의 스팀 프로젝트
스팀 증인노드를 운영중입니다. @jswit에 증인투표해 주시면 감사하겠습니다.
(https://steemitwallet.com/~witnesses)
Thank you, friend!


I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
please click it!
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)
The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.
Upvoted! Thank you for supporting witness @jswit.
@jsup !blog
Blogger url: http://joviansummer.blogspot.com/2023/12/pass.html