A 40gal will work but as mentioned it will need nice hides and other things making the snake feel secure as it moves through the cage. I raised my BP in a 40 gallon and she has always done well and is one of my best feeders.
If your grand plan is to only use this temporarily I would suggest you start cruising Craigslist for tanks and cages. You can run across some really cheap. Also know that Petco will do $1 a gallon deals every so often so you may want to look out for that.