A "Smeegle" tube of that length has even been used to catch a black mamba of just over 2.3 metres in length. I have been using these for about 10 years now and prefer them to bags and buckets. They are easy to carry and take up very little space in the boot of the car. There are also no chances that the snake can bite through the container like they do with bags.
Just do not rely on glue only for the cap and the screw lid. Over time they do come loose. Three pop rivets on each just makes sure the snake does not push the whole lid off. You can also drill a few more holes in the side for ventilation. I have also used this for small mongoose and leguaans besides all the snakes.