Just run the python file :)
I have compeletly explain the algorithm in comments section of the solution file.
A solution to the reader-writer problem that must be classified as the third solution because it prioritizes writers over readers, also doesn't lead to starvation for readers
Python