-
Notifications
You must be signed in to change notification settings - Fork 0
/
clearx.py
36 lines (35 loc) · 978 Bytes
/
clearx.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
def clearx(file):
import os
creator = open("not_clear.txt","a")
open1 = open("not_clear.txt")
open2 = open(file)
x = open2.readlines()
xx = open1.read()
num = 0
for i in x :
openxx = open(file)
x = openxx.readlines()
openxss = open("not_clear.txt")
xx = openxss.read()
if x[num] in xx :
openxx.close()
openxss.close()
open2.close()
open1.close()
pass
else:
write = open("not_clear.txt","a")
write.write(f"{x[num]}")
write.close()
open1.close()
open2.close()
openxss.close()
openxx.close()
num +=1
open1.close()
creator.close()
open2.close()
os.remove(file)
os.rename(f"not_clear.txt",file)
from termcolor import colored
return (colored(" setup 9/18 is completed ","red"))