Whats the difference between these boards.

Solution
Those are not even the more important aspects. The Prime Z370-A also has heatsinks on the VRMs, which the Prime-P does not. So if you are planning to overclock the A is a no-brainer versus the P.

Likely, the Z370-A also has better capacitor and other onboard component selection as well. The A series boards on ALL of the unlocked Z series chipsets have always been excellent budget choices for overclocking and have usually shown better gaming performance at least slightly, better everything actually, than any other board in the same chipset family that is not exclusively a very premium board or part of the ROG family.

PC Tailor

Illustrious
Ambassador
Key Differences:

Prime P
-has a slightly higher native RAM frequency capability, but both support up to 4000MHz
-Supports AMD CrossFireX
-1 x PCIe 3.0/2.0 x16 (x16, x8/x4+x4)
-4 x SATA 6Gb/s port
-2 M2 with SATA and PCIe interface

Prime A
- Supports DisplayPort
- Supports NVIDIA SLI and AMD CrossFireX
-2 x PCIe 3.0/2.0 x16 (x16 or dual x8)
-6 x SATA 6Gb/s port
-Intel Rapid Storage Technology and Intel Smart Response Technology supportive
- More advanced audio features
- 1 M2 with SATA and PCIe interface and 1 M2 with PCIe only
- More fan headers
- RGB strip headers
- More in built diagnostic features

The Prime A is more feature rich.
 
Those are not even the more important aspects. The Prime Z370-A also has heatsinks on the VRMs, which the Prime-P does not. So if you are planning to overclock the A is a no-brainer versus the P.

Likely, the Z370-A also has better capacitor and other onboard component selection as well. The A series boards on ALL of the unlocked Z series chipsets have always been excellent budget choices for overclocking and have usually shown better gaming performance at least slightly, better everything actually, than any other board in the same chipset family that is not exclusively a very premium board or part of the ROG family.
 
Solution
get the z370-a

since you are running the 8700k, which can be quite power hungry, especially under load.

from what i can see/predict.

both uses 4+2 vrm
z370-p uses a 4+2 vrm with 1 high/2 low per phase core, 1 high/1 low per phase soc
z370-a uses a 4+2 vrm with 2 high/2 low per phase core, 1 high/1 low per phase soc.

z370-p is the cheapest z370 asus offers. and z370-a is mid range board.

excluding features, the vrm on the z370-a is stronger. it can handle more current to the cpu and keep it cooler than the z370-p.

both should handle stock 8700k without issue.
to be honest, either are not very good @ overclock the 8700k,
let's say 4.7ghz (running max single core tb on all core)
i would think 4.7ghz should be doable on the z370-a, given that your case air flow is good.
z370-p you might run into issue due to vrm overheating.

if i had to choose, i will go with the z370-a, and only put a mild oc (4.6-4.7 ghz) over it on 8700k, 8600k should be okay to run @ 5.0ghz.
 
The A models of all the Z series board have ALWAYS been fairly decent overclocking boards. Usually they have practically the same build quality as the Hero boards, minus the ROG features. Maybe that's changed, to a small degree, on the Z370 boards. I dunno, haven't built with one of them yet and probably won't as I've been recommending for a while that users skip both Kaby and Coffee unless they cannot avoid it.

Not every overclocking board needs to be capable of a 5Ghz daily driver or have a custom loop. Most users don't overclock by more than several hundred mhz beyond the single core boost speed on their primary systems that see daily driver usage.