Wow.... I'm so shocked to see that myth is still around. Not to be rude but are you suggesting a burmese python which are capable of growing to 14 plus feet would only get say 5 feet long if kept in a 50 gallon. Or suggesting a cornsnake, a species that the largest specimen ever recorded was well under 6 feet, would grow say 20 feet if kept in a large enough aqurium? According to your logic technically I could go right now, and buy a small species of python or hell how about a huge species like a reticulated python which is known to grow 20-25 feet tops and dedicate something like a football field to it and actually expect it to grow 200 plus feet long?
All species have their own sizes any reptile book and hobbiest can tell you as such. The reason it might of seemed like monty only grew when placed in a large cage is because snakes especially pythons can take 5 plus years to mature and it's such a subtle process.
I'm really not trying to come off personally attacking you I just am astonded to see that myth still exsits and it really shouldn't be passed on to first time buyers just getting into the hobby. I respect the fact you've kept snakes for much longer then I and don;t personally know you and feel I have no place to judge you I simply want to point out that every known herpterologist ( one who studies reptiles) has burned that myths years ago and it is well established each individual species has it's own adult lengths ( after all wild snakes literally have the whole world as their "Cage" and yet I really haven't seen many snakes in my backyard that have been over the 10,000 foot mark
If your looking for some smaller species that would be fine in a 20 gal as adults, cornsnakes, smaller species of milksnakes, ribbon snakes, spotted pythons, rosy boas and sand boas are all good choices.
But I agree with everyone else do as much research as possible before commiting to a snake as they all have their own individual needs regarding, terrirum setup, lighting cycles, heating, humidity and so on and many times some will go off feed and you will have to resort to feeding live rodents ( which I personally hate doing plus it is very dangerous to your snake). So make sure you go out and buy a few books and read as many caresheets as possible before making that descion.
Here are a few good starting websites incase your interested in doing some reading
ReptilesCanada.com- great site full of hobbists which can answer any of your questions
Good cornsnake caresheet ( not this is a very basic intro to care, its essential to research how to treat dieses and recognize them along with methods to try when snakes are off feed and terrirum design)
Good Spotted Python / Childrens Python caresheet ( same goes for what I said above)
Good Sand Boa caresheet
Also just wanted to add, All of the reading I've ever done on rats is due to their highly social nature they need to be kept in pairs very much like ferrets despite how long you can play with them every day, that and that they need much more room then a 20 gal and need something with as many levels as possible. So maybe upgrading in the future and getting your rat a friend might help