解决:pycharm运行程序时在Python console窗口中运行而不是在运行窗口中运行 https://blog.csdn.net/Cinderella___/article/details/84290558