Pinkies (assuming mouse pinkies, not rat-) are not big enough to feed even a new hatchling BP, fyi. They start off on food the size of fuzzies or hoppers (mice) or baby rats of the comparable size.
Don't worry about exact length, & fyi, you can hurt your snake by forcibly straightening its body out to measure. So again, not to worry.
Yes, 40 gal. tank is plenty big enough.