I have a a Squier VM Jazz bass and I'm totally happy with it. If you go for a squire, then I'd suggest the extra fr a VM as apposed to an Affinity.
The Jazzbass has two pick ups, each with it's own tone and volume, so very flexible. The P-Bass has a split singe pick up, so eave the volume on max and just mess with the tone. It has a certain sund that the JazzBass can get (even when just set to one pick up) because the pick up is positioned on the string to get it. The should I get a Jazz or Precision was overcome to some degree by the PJ, which used both the standard singe coil of the Jazz and the split of the Precision. I dn't think the is Squier
I don't know the Yamaha, but a quick look and the it seems to be based n the PJ format, of two pick ups and one is a split. It just has 3 knobs, two volume and one master tone.
For versatility it seems mre comparison of the Jazz VS TRB. Jazz has the extra tone knob, TRB the Spit (P Style) pick up.
It's going to be close, but when you compare, I'd be cmparing the VM (Vintage Modified) price against the Yamaha.
As far as beginner goes, It the set-up that really matters. Truss-rod, bridge height, intonation and nut height. I've learnt to do this myself, but the best bass in the world with a bad set up, will not be great to learn on. Cheap basses are very good nowadays it seems and are generally capable of a good set-up.