Python changes the text direction, customizing the total number of rows.
#!/usr/bin/env python#-*- coding:utf-8 -*-x=u ' View free Bodhisattva, line deep wisdom, shabbiness Five Yun is empty, degree all bitter. Shariputra, color is not different, empty color, color is empty, empty is the color, by thinking of the knowledge, also as. Shariputra, is the law of the air phase, deathless, non-scale, not increase or decrease. It is therefore colorless in the air, not to be thought of, no eye ear nose tongue body meaning, colorless sound fragrance touch method, no vision, and even the unconscious world. There is no clear, no clear, even no old death, no old death. No hardship set out the road, no wisdom also no. In order to have no income, Bodhi Bodhisattva, according to the wisdom of more so, heart without from preoccupations, no from preoccupations, no terror, away from upside down dream, exactly nirvana. The Buddha of the third world, according to the wisdom of more so, Nou Doro three Miao qie three Bodhi. Therefore know prajna the wisdom of many, is the great God curse, is the big Ming Curse, is the curse, is no wait curse, can except all bitter, true not empty. Therefore, the wisdom of many mantras, that is to say the mantra: The Truth, Solomon revealed the truth, the Baltic monk uncover the truth, Bodhi. ' Lines = 13lens = len (x)//linesdef printn (cur): s = "|" for j in range (0,lens+3): #列 try: s += x[cur + lines*j] + "|" #[Current Line + Total row count *list interval], 13*0, 13*1, 13*2 except: pass return s &Nbsp; for i in range (0,lines): #行 print printn (i). Encode ( ' Utf-8 ')
Effect 13 lines:
$ python 1.py| | many | bitter | not |,| | no | | | | | no | | no |, no |, no |, no | no |, no | | | | | so | the |,| | from | time | to | |,| | | | | | | | | | |--|--|-------------------|,| | In |,|. | color | want to | is | not | color | body | boundary | also | no | also | bodhisattva | hang | far | world | | like | big | curse | | Zhao | |,| | | The |,|, the |,|, the old | no |,| | | to | | The |,| monk | | SA | | | | | | | |,| | | | | | | | | | | | | | | | |-|-|--| | |-|--No | | | | | | | | | | | | | | | | | | | | | |--| | | | like | no | pour |,| | luo |,| in addition | | Line | Yun |,| | | | | | | | | | | | | |-| | | | | | | | | | | | | Deep | all | color | empty | |,| | | | | | | no | | | | | | | | | | | | | | | Like | empty | not |,| such as | not | less | knowledge | incense | knowledge | is | bitter | | luo | so |,| | Miao qie |,| | | If |,| | empty | is | born | |,| Flavor | | | | | | | | | | | | | | The Wave | three | is | Curse |,| | Wave | degree | empty | is | | | | | | | | no | | | | | | | | | | | | | | | | | Luo | |,| | | | | | | | | | | | | | | | | | | | | | | | | | | Honey | cut | empty | color | Lee |,| Empty | ear |,| | dead |,| |,| Fear | nirvana | many | | curse | none | |
Effect 15 Lines:
$ python 1.py| |,| | is | such as | not | empty | tongue |,| ming | no | have | | | | | | | from | | | | | | | | | | | | | |,|,| | | | | | |-|--| | In | See |,|,| |,| | To |,| set |,| Heart | far | buddha | Luo |,|,| No | curse | monk | | Pu | wu | color | empty | | no | no | |,| | | | | | no | to |,| | yes | | | SA | |,| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |-| | | | | | | | | Line | empty | empty | color |,| Net | | | | the | | | the | | | the | | | | | Deep |,|,|,| is |,| want | incense | | dead | wisdom |,| | want | wave | Titus |,| Curse | | ---------------| |--|--No | | |,| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wave | cut | different | line | null | no |,| | | | | | no | | | | | | | | | Luo | | | | | | | | | | | | | | | | | | |,|,| | | | | | Honey | |,|,|,| | eye | no | also | dead | to | luo | no | nirvana |,| if |,| cut | | Multi | | | | | | | no | | | | | | no | | | no | | | | | | | | | | | | | | | | | | | | | | | | | | | | no |,|,|,|
Python change text to Vertical