码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2017-03-07 08:37:46      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:1.2   python3   打印   ack   str   标题   odi   print   python学习   

本节点标题
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!

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

标签:1.2   python3   打印   ack   str   标题   odi   print   python学习   

原文地址:http://www.cnblogs.com/helloxwr/p/6512779.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!