No. The tank should be long enough for HALF the length of the snake...or so I believe. No cage really ever has to be long enough for any snake to stretch to their full length, that's more for large lizards.

a 10gal is 22"x10"x12". A 20L is 30"x12"x12". A 9 month old snake would be too big for a 10, as my 4 month old is just right in her 20L. Adult BP's should be housed in a cage no smaller than 36"x18"x12" and a good adult cage would probably be around 48" long.

As for your cramped apartment situation, it would be best to pick up either a 20L tank or a @32q tub. Neither takes up much room and I don't think the snake will seriously outgrow either in the time you mentioned. Though they may be a bit cramped, they tend to like it that way and won't mind as long as it isn't that small allways.