Skip to content
← Back to Community
Make a Copy of Replit DB (Python)
Profile icon
CodingElf66

Make a Copy of Replit DB (Python)

I really need help on this, so please help!
I will be rewarding whoever answers this 5 upvotes!

Voters
Profile icon
CodingElf66
Comments
hotnewtop
Profile icon
MrVoo

If you mean what I think you mean, just do dbCopy = db

Profile icon
CodingElf66

@MrVoo That wouldn't work, because you're basically assigning the db to another variable that is literally going to be the exact same thing.

But I'll try it, thanks! (because I'm not sure lol)

Profile icon
MrVoo

@CodingElf66 What did you mean by a copy then :P

Profile icon
CodingElf66

@MrVoo Make it so that there are two dbs.

Profile icon
CodingElf66

@MrVoo And your way doesn't work btw.

Profile icon
MrVoo

@CodingElf66 Why would you need two? If you're trying to bypass the storage limit, it wont work.

Profile icon
ShivankChhaya

@CodingElf66 dbCopy = db[:]
the [], takes a portion of the iterable, and [:] will copy the entire iterable

Profile icon
CodingElf66

@ShivankChhaya Ok I will try that.

Profile icon
CodingElf66

@ShivankChhaya Still doesn't work.

Profile icon
MrVoo

@CodingElf66 Why would you need two?

Profile icon
ShivankChhaya

@CodingElf66 what exactly do you want to do?

Profile icon
MrVoo

@CodingElf66 If you're trying to bypass the storage limit, that's not allowed

Profile icon
CodingElf66

@ShivankChhaya Just make another one

Profile icon
CodingElf66

@MrVoo For something. Anyways, say goodbye to your upvotes.

Profile icon
ShivankChhaya

@CodingElf66 thats not possible

Profile icon
MrVoo

@CodingElf66 Oh no, I lost 5 wHoLe cycles! My life is in ruins...