forked from 521xueweihan/python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex10.py
More file actions
30 lines (27 loc) · 529 Bytes
/
ex10.py
File metadata and controls
30 lines (27 loc) · 529 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#coding:utf-8
#################
# 习题10:那是什么
#################
# 前言
#
# 这里主要理解:转义字符的做用
#
tabby_cat = "\tI'm tabbed in."
persian_cat = "I'm split\non a line."
backslash_cat = "I'm \\ a \\ cat."
# \t是输出八个空格
# \n是换行
fat_cat = """
I'll do a list:
\t* Cat food
\t* Fishies
\t* Catnip\n\t* Grass
"""
print tabby_cat
print persian_cat
print backslash_cat
print fat_cat
# 试试运行下面的代码
#while True:
# for i in ["/","-","|","\\","|"]:
# print "%s\r" % i,