在Python中从数据库(replit)中删除特定值

问题描述 投票:0回答:1

iam 试图从“Replit”数据库中删除特定值,但我找不到正确的方法。 有人可以把我的鼻子推向正确的方向吗?

user_input = "a"  

def check(user_input):
  if user_input in db["passwords"]:
    db["used_password"] = user_input
    print("correct")
  else:
    print("false")
 
check(user_input)
python-3.x replit
1个回答
0
投票

del db[key_to_delete]
从数据库中删除特定键,从而允许您删除任何想要的值。这有帮助吗?

© www.soinside.com 2019 - 2024. All rights reserved.