
from pymongo import MongoClient
client = pymongo.MongoClient("mongodb+srv://<username>:<password>@cluster0.e4w3e80.mongodb.net/Cluster0?retryWrites=true&w=majority")
db = client.test
db = client.dbsparta
doc={
'name':'bob',
'age':27
}
db.user.insert_one(doc)
pymongo.MongoClient() 괄호 안에 들어가는 부분이 잘못된것 같습니다
client = pymongo.MongoClient("mongodb+srv://<username>:<password>@cluster0.e4w3e80.mongodb.net/?retryWrites=true&w=majority")
db = client.test
db에서 복사한 코드는 이것입니다
