You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
565 B
20 lines
565 B
import os
|
|
lines = list([i.strip() for i in open('users_base.txt').readlines()])
|
|
result = []
|
|
_exc = ['# 1', '# 2', '# 3', '# 4', '# 5', '# 6', '# 7', '# 8', '# 9', '# 10', '# 11', '# 12', '# 13', '# 14', '# 15',
|
|
'# 16', '# 17', '# 18', '# 19', '# Web', '# Java', '# iOS', '# Excel']
|
|
|
|
for r in range(1, len(lines)):
|
|
l = lines[-int(r)]
|
|
if l not in result or l in _exc:
|
|
result.append(l)
|
|
|
|
|
|
f = open('users_base.txt', 'w')
|
|
result.reverse()
|
|
for line in result:
|
|
line += '\n'
|
|
if line in _exc:
|
|
line += '\r'
|
|
f.write(line)
|
|
f.close()
|
|
|