Looks like i found the problem when importing from a text file, you have to .rsplit like this:
inputraw = text1.get("1.0",'end-1c') input=inputraw.rsplit(" ")after doing that if and search functions works verywell it took a day for me to figure this out. I was considering saving the get as txt file than reopening it :).