No, one cannot write an operation system in python. In very simple terms, operating system is a software that manages the hardware resources of the computer. Hence, it needs to run directly on top of the hardware without anything in between, this is called running bare metal.
What is an OS on scratch?
Operating Systems (OS) - Scratch Studio. Operating Systems (OS)