Learn Python The Hard Way(1)

#!/usr/bin/env python
# -*- coding: utf-8 -*-

print 'Hello World'
print 'Hello Again'
print "I like typing this."
print "This is fun."
print 'Yay! Printing.'
print "I'd much rather you 'not'."
print 'I "said" do not touch this.'

    打开文件编辑器输入上述内容,保存为e1.py,在相应操作系统下运行(我是在windows系统下运行)得到如下结果:

                                                   Learn Python The Hard Way(1)_第1张图片

   练习以下例子:

   1、再打印一行

   2、脚本只打印一行 

   3、在一行的开始加上“#”会打印出什么内容?


你可能感兴趣的:(Learn Python The Hard Way(1))