I have a "showcase" cage that has an even larger top gap. I used "great stuff" expanding foam. It's used for sealing windows, and can be found at any hardware store. You only have to fill the gap halfway and it expands to fill the remaining gap. I let the cage air out for a few days before introducing the snake into it.