Bungee cords or binder clips are the way to go. If you're using bungee cords just be careful when you're taking them off or putting them on they snap back and can cause harm. Personally, i like binder clips

Things like weights (rocks or books or bricks) can be dangerous because the snake may still be able to push part of the lid up and then can get caught between the lid and the tub and suffocate. I think there are a few threads with this scenario happening in them and those members lost their animals, or animals like cats or dogs can push the weights off and then you're back to the same situation.