I would recommend a tub over a tank, honestly. You'll have a lot easier time controlling temps and humidity. At his size he would be find in something around the 28qt range. Ball pythons prefer more intimate quarters, so a massive enclosure isn't usually advised. If you're insisting on a tank, I would hold off on the 40 gallon until he is fully grown because he very well might feel too stressed out in such a large enclosure.