Okay so this is a strange error to describe so bear with me.
I'm currently working on an assignment that requires me to use the Python os module to test Linux processes.
Since my laptop is running windows 10 and all my Linux VMs have miraculously stopped booting I tried using a SSH to a linux machine and the Ubuntu subsystem on my own machine to run this block of code:
import os
pid = os.fork()
if pid == 0: # the child
print("this is the child")
Here is a screenshot of the resulting error on the linux subsystem: (The same shows up for SSH)

Now the interesting thing is after I type the second line the 'if' statement is automatically indented with the double '>>> >>>' and I have to press each key sever times before it is displayed in the console.
Any advice would be helpful on what could cause this.