This is a very damaging myth perpetuated especially in the fish and bird world. No, you cannot keep a red-tail boa at 24" long by cramming in into a 1 gallon plastic Critter Keeper, nor can you entice a ball python to grow 12' long by putting in a 300 gallon tank.
As with pretty much all creatures, including people, snakes grow to the size determined by their genes, and trying to regulate the size of a snake with enclosures is as ridiculous as trying to keep your child 3' tall by stuffing them into a trunk, or make him grow 9' tall by stretching his legs, it doesn't happen. Best case scenario, the snake will outgrow it's enclosure and force you to get a bigger one OR refuse to eat from the stress of a monster tank, forcing you to get a smaller one. Worst case scenario, you'll stress your snake to the point of illness or even death.
Gale