Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = 'abcdefghijklmnopqrstuvwxyz'
- s2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
- write = 'my_new.txt'
- files = "text.txt"
- my_files = open(files, mode='r', encoding='1251')
- my_files2 = open(write, mode='w', encoding='1251')
- for line in (my_files):
- my_files = line.split()
- for r in sorted(my_files):
- if r<s2 or r<s:
- print(r)
- my_files2.write(r+' ')
- my_files2.write('\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement