
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
작성한 코드 및 에러 메세지
from pymongo import MongoClient
import certifi
ca = certifi.where()
client = MongoClient('mongodb+srv://test:sparta@cluster0.hhuu5cz.mongodb.net/Cluster0?retryWrites=true&w=majority', tlsCAFile=ca)
db = client.dbsparta
all_users = list(db.users.find({},{'_id':False}))
for user in all_users:
print(user)
/Users/moonchoi/Desktop/sparta/pythonProject/venv/bin/python /Users/moonchoi/Desktop/sparta/pythonProject/dbprac.py
{'name': 'bob', 'age': 27}
{'name': 'bob', 'age': 27}
{'name': 'bob', 'age': 27}
{'name': 'bobby', 'age': 27}
{'name': 'john', 'age': 20}
{'name': 'ann', 'age': 28}
{'name': 'bob', 'age': 27}
왜 'bob'에 관한 값이 이렇게 많이 나오는거죠?ㅠㅠ
