Good advice. The only caveat being this only works for certain laptop models
However the reason I know this is the same reason I keep mine in: I've dropped every laptop I've ever owned on the floor multiple times, and I've had one or the other of battery or charger cable fall out at least once for all of them, at least with the battery in the chances of losing power is reduced (though I have on occasion had both fall out at the same time).