原因是用程序选择了console来运行,取消console方法如下:

Run->Edit Configurations 取消run with python console的勾

补充拓展:解决pycharm运行后不显示run的结果问题

1:函数结果未通过print进行输出,修改后:print (函数名())

2:取消Run with python console