About the solution of pygame running unresponsive
I just started to learn pygame recently and encountered a lot of pits, record and share here.
The reason was found later because:pygame must respond to pygame.event.get() in the loop body, otherwise the system will think that the window is not responding, the mouse will keep turning and waiting for the response, and after clicking, the window will display no response.
Add the response to the event in the while loop, The modified code is as follows