Python之第一个程序
2017-04-22 23:41
169 查看
交互式命令行:
[root@localhost ~]# python #进入交互式界面
Python 2.6.6 (r266:84292, Jul 23 2015, 14:41:34)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print("hello!word") #注意格式
hello!word
>>> exit() #退出
Python脚本:
[root@localhost ~]# vim a.py
#!/bin/env python
print("hello!word")
[root@localhost ~]# chmod +x a.py
[root@localhost ~]# ./a.py
hello!word
print()函数可以用于输出指定的字符串
[root@localhost ~]# python #进入交互式界面
Python 2.6.6 (r266:84292, Jul 23 2015, 14:41:34)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print("hello!word") #注意格式
hello!word
>>> exit() #退出
Python脚本:
[root@localhost ~]# vim a.py
#!/bin/env python
print("hello!word")
[root@localhost ~]# chmod +x a.py
[root@localhost ~]# ./a.py
hello!word
相关文章推荐
- 第一个Python程序
- 人生的第一个Python程序
- 第一个python的GUI程序
- [转载]看完《python简明教程》笔记及第一个python程序
- 看完《python简明教程》笔记及第一个python程序
- Python的第一个程序
- 我的第一个Python程序--批量生成Oracle DDL文件
- 深入Python3 (Dive Into Python3)笔记1--你的第一个 Python 程序
- Python 研究(Dive Into Python)笔记1--第2章 第一个 Python 程序
- 第一个 Python 程序
- 开始学习python了,第一个程序是一个逆波兰式的表达式分析器
- 第一个python 程序
- 第一个python CGI程序——hello,world
- 第一个python程序
- 第一个python程序-blog数目统计
- 我的第一个python程序-新浪新闻阅读器
- 第一个Python程序
- 我的第一个Python小程序
- 第一个python程序
- Python 写的第一个算法程序,果然很强大