I'm going to assume you're still a child (under 18), what has happened has happened. Not trying to give you a hard time but the snake probably died from bad practises and ownership. Divorce is extremely hard on a child and I could probably imagine you were always excited to go to the one parent's place to see your snake. Your situation however was not suitable for the caring of an exotic animal.
You live and you learn, sucks the snake had to get the bad end but nothing is going to bring it back.
Going forward I would probably avoid a pet, or maybe talk to that one parent about getting a pet that doesn't require special care or a pet they would look after and care for while you were away.
Don't give yourself too hard of a time, you're not the first this has happened too and definitely not the last. It's a lesson for everyone, 99% of the time its the animal that ends up suffering and its a topic for another day but pet ownership is not a joke or something to be taken lightly, its a lot of responsibility and unfortunately uninformed owners, money hungry pet shops and just ignorant people will continue to put animals at harm.
Have a good long weekend!