How to get one value from TinyDB database?
I am learning how to use TinyDB in Python and I have the basics working (add, remove, update, etc.). But now I am trying to get certain values ββfrom the database. The code I'm using is in this method:
def showpassword():
show = userdb.get(where("username") == txtname.get())
txtshow.insert(0, show)
When I run the method, it outputs output like this:
{'username': 'John', 'surname': 'Doe'}
How can I get it so that I can only display the user's first or last name and without any parentheses?
+3
source to share