# 假设以下文本是从网络上抓取的
# 要求:顺序并且居中对齐输出以下内容
poem = [
"\t\n登鹳雀楼",
"王之涣",
"白日依山尽\t\n",
"黄河入海流",
"欲穷千里目",
"更上一层楼"
]
for poem_str in poem:
# 先通过strip方法去除空白字符,再使用center方法使文本居中对齐
print("|%s|" % poem_str.strip().center(10, " "))
# center:居中对齐
# ljust:居左对齐
# rjust:居右对齐