When my corn was a baby, I had him in a 10L tank that just had a sliding screen lid. I *knew* he was little enough to squeeze out between the lid and top, I affixed my own sticky backed velcro to the front inside lip of the lid and the tank. When that sucker was closed, there was NO gap at all and no way possible a snake could push against the Velcro strength to get it open.
Jenson is now in a 20L Zilla viv like pictured below and I have no problem with that lid always fitting snuggly - but then my corn is nearly as big around as a hotdog now, so not possible for him to get out of it, hehe. =)