Python3学习笔记01-第一个Python程序

在本地安装好后Python后,进入命令行模式,输入Python,就进入Python的交互模式:python

C:\Users\user>python
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit;
Use exit() or Ctrl-Z plus Return to exit
>>> exit()

 

 

小试牛刀,打印第一个程序:编辑器

 

使用文本编辑器编写代码,而后再切换到命令窗口执行:命令行

// 切换到D目录下,保存文件的路径下
C:\Users\pocouser>D:

D:\> cd Python\python

// 执行文件
D:\Python\python>python hello.py
hello,xiaojun

D:\Python\python>

 

Mac环境中开发:code

在终端先切换到文件所在的目录,而后再执行hello.py文件orm

相关文章
相关标签/搜索