Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 sqlite3 语句中选择 3 个变量。并将其放入 3 个 python 变量中,无法使其工作..
knifekingdb.execute("SELECT rank, rounds, date FROM knifekingdb WHERE steamid = ?", steamid)
我可以通过将该语句分配给 python 变量将其放入一个列表中。但我不知道如何将整数和字符串列表拆分为不同的变量。
你能帮帮我吗,因为我有点卡住了。
knifekingdb.execute( """SELECT rank, rounds, date FROM knifekingdb WHERE steamid = ? LIMIT 1""", steamid) try: rank, rounds, date = knifekingdb.fetchone() except TypeError: # fetchone returned None because no row was found # handle error here raise