#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http 제목Lecture13-2_DataCollectionTypes2 질문2021-11-04 17:05작성자강감강observation_file = open('extxt.txt','r')bird_count=[]for line in observation_file: bird=line.strip() found=False for entry in bird_count: if entry[0]==bird: entry[1]+=1 found=True; if not found: bird_count.append([bird,1])print(bird_count)27:13쯤 내용으로, 딕셔너리 이전에 list로 정리하는 방식입니다.제가 궁금한 것은,for entry in bird_count: if entry[0]==bird: entry[1]+=1 found=True;여기서 entry가 list 인것을 정의하지 않았는데 처음에 어떻게 entry[0] == bird임을 확인하나요? 목록수정삭제답변글쓰기 댓글 [0] 댓글작성자(*)비밀번호(*)내용(*) 댓글 등록 더보기이전[re]file_2 강의 예제수업도우미 정수연2021-11-06다음[re]Lecture13-2_DataCollectionTypes2 질문신종민2021-11-04 Powered by MangBoard | 워드프레스 쇼핑몰 망보드