May-12-2019, 02:13 PM
ok so I changed the code
so
def find_filter_output(output,find): files = [] lines = output.split("\n") contains = False found = False findStr = str(find) if findStr == "": word = "invalid" files.append(word) return fileshere I test to see if findStr is empty by saying if findStr == "", this works great but I noticed when I put a space in between the "" it does not work or become true
so
if findStr == " "will give a boolean false value even if findStr is empty, so why does adding a blank space between "" make a difference? I thought that even if I had countless of blank spaces between the "" it would still be an empty string no?