20 gal WILL be too small. Temp wise they are pretty hardy but they're an incredibly active semi-arboreal species that require A LOT of space. Granted this depends if OP means a 10-20 gal tank to START with then upgrade later as the snake grows OR as a permanent home. If the latter, then I'd say russian rat snakes are off the list.
Edit: Starscream beat me to the punch lol