Ask coding questions

← Back to all posts
Replit Database

I'm currently trying to make a console game in Python, and I need to store user information (usernames and passwords), I want to store this in an array but whenever I try to append the array I get an error.

What I tried:
currentAccount = Account(accountName, accountPassword);
db.set(userInfo, currentAccount)

Account is defined as this

class Account:
def init(self, accountUsername, accountPassword):
self.Username = accountUsername;

userInfo is defined as this

userInfo = db['userInfo'];