2019-02-13
閱讀量:
1009
執(zhí)行python腳本閃退問題
執(zhí)行test.py的時候閃退,腳本內容如下
print ("Hello World!")
print ("Hello Again!")
print ("I like typing this.")
print ("This is fun.")
print ('Yay! Printing.')
print ("I'd much rather you 'not'.")
print ('I "said" do not touch this.')
這是什么原因?
答:
不是閃退,是程序運行完自己退出關閉窗口了
import os
os.system("pause")
這樣可以保證,打印完所有信息之后,等待你的輸入才結束運行






評論(0)


暫無數(shù)據(jù)
推薦帖子
0條評論
0條評論
0條評論