The Pentax K mount was introduced in 1975 and has been Pentax’s primary mount for both film and digital SLRs since. It has changed a few times to add new features like automatic aperture control and autofocus, but the bayonets are identical. This means all Pentax K lenses will mount on all K mount bodies, including the newest digital cameras.
Pentax K was also widely used by other manufacturers, like Ricoh, Cosina, and Chinon, so there is a wide variety of lenses available for the system. M42 lenses can also be adapted quite easily to work on Pentax K bodies.
Pentax K mount was made popular by the Pentax K1000 (1976-1997), one of photography's greatest, most popular and longest-lived 35mm SLR cameras. The K1000 is still one of the go-to recommendations for photography students and others learning 35mm photography. The ability to use Pentax K mount lenses on newer digital cameras and mirrorless systems has kept the demand up for legacy K mount gear.
Note: Ricoh Pentax K mount lenses have a special “Ricoh pin”. If you want to use these lenses on autofocus Pentax cameras, the pin must be removed. Otherwise it will become locked to the autofocus shaft and removing the lens may require disassembly.