Hello Everyone,
I am trying to get the lines that contain test string or if its not found i want to print not found message. However this doesnt seem to work i dont get any messages at all.
I can read text file, i can even make it count with "for line in input:" however none of the if conditions work inside for indentation. Am i missing something ?
I am trying to get the lines that contain test string or if its not found i want to print not found message. However this doesnt seem to work i dont get any messages at all.
I can read text file, i can even make it count with "for line in input:" however none of the if conditions work inside for indentation. Am i missing something ?
def verial():
isimsatırlistesi=list()
satırsayısı=0
input = text1.get("1.0",'end-1c')
for line in input:
satırsayısı=satırsayısı+1
if "test" in line:
isimsatırlistesi.append(int(satırsayısı))
print(isimsatırlistesi[0,"end"])
if len.isimsatırlistesi<0:
print("test not found")
