1. 利用python的原生解释器
python txt.py
2. 利用idle,交互式的执行(linux,用python直接进入)
exit()或者ctrl +d
3. 利用开发工具,pycharm或vscode等运行