Typeerror 'mongoclient' object is not callable

from pymongo import MongoClient

mongo_url = "mongodb://localhost:27017"

mongo_db = MongoClient(mongo_url)


#Create db
db = mongo_db["TestDB5"]
#Create collection
col1 = db.get_collection("TestColl5")

#Create document

data = dict()
data["Name"] = "John"
data["Age"] = 17
data["Id"] = 7
data["Class"] = 8
data["FinalScore"] = 76

x= col1.insert_one(data).inserted_id

print("Data created successfully")


col1 = db.create_collection("TestColl5")

@Sathyan_R if you’re still facing this error please post the entire Python traceback so we can see which line(s) the error gets raised on.