I know about p-type semiconductors and that there are holes as majority carriers present in the semiconduction. If we apply current through this semiconductor electrons from the valence band will come, to occupy the holes thus leaving a hole behind them, so we can say that the hole creates a current. Now what confused me is that those holes can not escape the semiconductor crystal itself, so how is current possible. Or do valence electrons leave because of attraction from the positive terminal of the battery?
Please help me understand this