print('add usernames to tree')
for result in cur.fetchall():
    tree.add(str(result[0]))
print('build fsa')
tree.make()
for line in f:
    scanned += 1
if tree.search(line) != None:
    pass
Searching text for a long list of substrings