Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # holy_macro.py <<< Quick Text List Editor
- aaa='''
- CCC
- AAA $ $ $ $ one!
- $ $$ $$$$$$$$$$ $ two!
- 123 A B C X Y Z CCCCCC
- AAA
- 123$ $ $ $ $ $ $ $ $ $
- $$$$$$$$$$$$$$$$$$$$$$
- CCCCC A A A A A ABBBBB
- BBB
- AAA $ $$ $$$$ $$ zero!
- CCCCC A A A A A ABBBBB
- $$$$$$CCCCCCCCCCC12345
- '''
- aaa=aaa.split('\n\n')
- while aaa[0].startswith('\n'):
- aaa[0]=aaa[0][1:]
- aaa.sort()
- print 'samples = ['
- for i in aaa:
- a,b=i.split('\n',1)
- b=b.replace(' ','')
- b=b.replace('$$$','')
- b=b.split('\n')
- b=''.join(b)
- print '\t[ "'+unicode(a)+'",'
- print "\t '"+b+"' ],"
- print
- print '\t]'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement