Filipe Teixeira
Member
nice code.Possibly something a bit like this? Just create a text file containing a list of algorithms in the same folder as the python file and it should work fine.
@Waffles
Python:alg_list = open("algs.txt", 'r').read().splitlines() filter_requirement = input("Exclude algs containing: ") check_for_suffix = False if len(filter_requirement) > 1: check_for_suffix = True output = [] for i in alg_list: if filter_requirement in i: if check_for_suffix: if i[i.index(filter_requirement) + 1] == filter_requirement[1]: print("Discarded item: " + i) else: output.append(i) elif not check_for_suffix: if i[i.index(filter_requirement) + 1] == " ": print("Discarded item: " + i) else: output.append(i) else: output.append(i) print("OUTPUT:") for i in output: print(i)
it would be interesting if the output was the not filtered out algs, not the excluded