Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fields = ['first-name', 'last-name', 'email-address', 'phone-number']
- values = ['John', 'Doe', 'john.doe@johndoe.com', '1-800-123-4567']
- {
- 'first-name':'John',
- 'last-name':'Doe',
- 'email':'john.doe@johndoe.com',
- 'phone-number':'1-800-123-4567'
- }
- def getFirstName(self, lastname):
- client = MongoClient()
- db = client.test.contacts
- result db.find({ 'last-name':lastname })
- return result['first-name']
- self.getFirstName("Doe")
Add Comment
Please, Sign In to add comment