object
This commit is contained in:
parent
2edac8dab0
commit
612d34268d
|
@ -0,0 +1,21 @@
|
||||||
|
# coding:utf-8
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
def objectFind(objs, filepath):
|
||||||
|
n = len(objs)
|
||||||
|
with open(filepath, 'r') as f:
|
||||||
|
for line in f.readlines():
|
||||||
|
for item in objs:
|
||||||
|
if(line.replace(" ", "").startswith(item)):
|
||||||
|
n = n-1
|
||||||
|
objs.remove(item)
|
||||||
|
#print(line)
|
||||||
|
continue
|
||||||
|
f.close()
|
||||||
|
#print("n = {}".format( n))
|
||||||
|
if n == 0:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
print(objs)
|
||||||
|
return False
|
Loading…
Reference in New Issue