I'm working with the shelve library, on Python 3.8.3., and I'm fairly confident with creating new entries from a database, and reading a certain key's values. However, I can't do something like this:
users = shelve.open("users", "r")
name = input()
if name in users:
do something
else:
do something else
users.close()
Since I don't have access to the dictionary directly, but to a shelve object. I suppose I could turn the keys into a list, but that would defeat the whole purpose of using a dictionary. Any ideias?