脚本编程与交互式编程

Terwer...小于 1 分钟大数据开发新思路新笔记python

脚本编程与交互式编程

命令式

image-20220605222444153
image-20220605222444153

可以直接用 python 命令运行

➜  ~ python3 /media/terwer/data/workspace/terwer/pyhello/main.py
Hello World!
hello my friends

交互式

image-20220605222419211
image-20220605222419211

交互式一次只能运行一行代码。

退出方法:

  • exit()
  • Ctrl+D
➜  ~ python3                                                    
Python 3.7.3 (default, Mar  9 2022, 03:38:16) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
➜  ~ python3
评论
  • 按正序
  • 按倒序
  • 按热度
Powered by Waline v2.14.9