Skip to content

Instantly share code, notes, and snippets.

@dervn
Created January 29, 2012 06:36
Show Gist options
  • Save dervn/1697568 to your computer and use it in GitHub Desktop.
Save dervn/1697568 to your computer and use it in GitHub Desktop.
文字竖排
x = u'床前明月光 疑是地上霜 举头望明月 低头思故乡'
print '\n'.join(' '.join(x) for x in zip(*map(list, x.split(' ')))) #这个写法还有点问题,有空再来研究
---
低举疑床
头头是前
思望地明
故明上月
乡月霜光
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment