热门IT资讯网

\t 和\n

发表于:2024-11-27 作者:热门IT资讯网编辑
编辑最后更新 2024年11月27日,It's been over a month\t 居中显示\n 换行----------------------------------tabby_cat = "\tI'm tabbed in."pe

It's been over a month


\t 居中显示


\n 换行



----------------------------------

tabby_cat = "\tI'm tabbed in."

persian_cat = "I'm split \non a line."

backslash_cat = "I'm \\ a \\ cat."


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



---------------------------------------

代码显示:

I'm tabbed in.

I'm split

on a line.

I'm \ a \ cat.


I'll do a list:

* Cat food

* Fishies

*Catnip

*Grass



0