python学习笔记(11)-python第一个小程序hello world

本节点标题
1、第一个小程序hello world
1.1、python2与python3的hello world
1.2、换行的打印


=======================================================================================================================
1、第一个小程序hello world
1.1、python2与python3的hello world
>>> print "hello world!" --python2.x
hello world!
>>> print("hello world!") --python2.6、2.7、3.x
hello world!
>>>

1.2、换行的打印
#!/usr/bin/env python36
#!coding=utf-8
print ("helo world!\nI love you!")
结果:(\n是换行)
helo world!
I love you!

posted on 2017-03-07 01:01  草盖木先生  阅读(213)  评论(0编辑  收藏  举报