Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- text = 'this is text\nsomething\nsomething else\nsomething or other'
- lines = text.split("\n")
- maxlen = max(len(line) for line in lines)
- print ' '+'-'*maxlen
- for line in lines:
- print '|'+line+' '*(maxlen-len(line))+'|'
- print ' '+'-'*maxlen
- if 'win' in os.sys.platform:
- os.system('PAUSE')
Advertisement
Add Comment
Please, Sign In to add comment