커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
3-14강 질문드립니다.
undefined주차
북마크
조*준
댓글
3
추천
1
조회수
10
조회수
10
답변 완료

실행결과가 두 번 나오는데 뭐가 잘못 됐는지 모르겠습니다.



스파르타 즉문즉답




from pymongo import MongoClient
client = MongoClient('mongodb+srv://test:sparta@cluster0.elmvao9.mongodb.net/cluster0?retryWrites=true&w=majority')
db = client.dbsparta

score = db.movies.find_one({'title': '가버나움'})
star = score['star']

all_movie = list(db.movies.find({'star':star}, {'_id': False}))

for i in all_movie:
    if i['star'] == star:
        print(i['title'])





취소
 공유
취소
댓글 0
댓글 알림
나의얼굴