본문 바로가기
파이썬

파이썬 How do I check if a list is empty?

by º기록 2020. 10. 7.
반응형

예를 들어 다음을 통과 한 경우 :

a = []

a 가 비어 있는지 어떻게 확인합니까?

 

해결 방법

 

if not a:
  print("List is empty")


 

참조 페이지 https://stackoverflow.com/questions/53513

 

 

반응형

댓글