Skip to content
How do I edit a file with a specific name according to the user
Profile icon
JW2005

So after I made this code, it will open a new file but the code cannot write anything into the text file I have opened. Any ways that I can do this. It is sort of like when a user inputs his or her username, the text file will open accordingly, and what the user has typed or edit, the file will append and write them in the text file. But my code doesn't work. TT

image

You are viewing a single comment. View All
Profile icon
VulcanWM

Yes you can do
db[‘Users’] = {‘user1’: {‘coins’: 0, ‘lives’: 5}, ‘user2’: {‘coins’: 5, ‘lives’: 0}}


@JW2005