Something I did for my tarantula was make a line of superglue along the inside rim and then attached the tinfoil on the underside of the lid and then poked ventilation holes accordingly. Not sure if such a method would work for a snake though since you'll need a hole for the heat source and that will probably give the snake the chance to eventually bump into and pull the tinfoil sheet(s) down.