

튜터님은 이렇게 작성하셨더라구요
for movie in movies: 이렇게 for문을 돌리면 movies안의 movie를 전부 다 꺼내는거라고 이해했는데
if a is not None 만 쓰면 title( = a.text)에서만 none이 빠지는거 아닌가요?
rank와 star에는 none이 그대로 있지 않나해서요
그래서 저는 전부 none을 제외하려고 아래처럼 썼습니다.
a is not None 한 줄만 써도 되는 이유가 궁금합니다!
movies = soup.select('#old_content > table > tbody > tr')
for movie in movies:
rank = movie.select_one('td:nth-child(1) > img')['alt']
a = movie.select_one('td.title > div > a')
star = movie.select_one('td.point').text
if rank and a and star is not None:
print(rank, a.text, star)
