learn python the hard way (personal) -- Ex1

来源:互联网 发布:arm linux内核 编辑:程序博客网 时间:2024/06/05 15:33

For this exercise, try these things:

1.Make your script print another line.

print(‘’)

notice:(1)Python是自动换行,若要将内容执行在同一行,在行尾输入end=""

                ex: print('a',end="")

                     print('b')

            (2)输出中文时,需要在文档最开头加上

               # coding: utf-8

2.Make your script print only one of the lines.

在其他行首全加上#

3.Put a # (octothorpe) character at the beginning of a line. What did it do? Try to find out what this character does.

#为注释符号

原创粉丝点击