Skip to content
← Back to Community
Help Pls
Profile icon
YeetMstr

I want to know how to create accounts that save

Like in the fishing game, there were accounts that saved your progress

I want to know how to do this in python pls

Thanks!

Answered by HackermonDev [earned 5 cycles]
View Answer
Voters
Profile icon
seagu11
Profile icon
mkhoi
Profile icon
YeetMstr
Comments
hotnewtop
Profile icon
ash15khng

You could either use a text file or a database to save each account name.

Profile icon
YeetMstr

@ash15khng and @PDanielY Thank you for help but which would be better in terms of saving without forking onto your device?

Profile icon
HackermonDev

@epicman702 database

Profile icon
YeetMstr

@PDanielY Could you give me a code with this example?

Profile icon
HackermonDev

@epicman702 actually database is stored in you device but you could use remotemysql.
Here is an example with Python:

import mysql.connector mydb = mysql.connector.connect( host="localhost", user="yourusername", passwd="yourpassword" ) print(mydb)
Profile icon
HackermonDev

@PDanielY you can get the username and password from remotemysql and the host is remotemysql.com

Profile icon
YeetMstr

@PDanielY Ok thank you!
I'll try figure it out
Looks complicated

Profile icon
HackermonDev
Profile icon
YeetMstr

@HackermonDev hehe, I ended up using files after all these years

Profile icon
HackermonDev

You can use pickle