obsluha = open("/home/standag/krakatit.txt","r") data = obsluha.read() #print(data) obsluha.close() obsluha = open("krakatit.txt","r") data = obsluha.read() data = data.decode("cp1250") #print(data) obsluha.close() ob1 = open("krakatit.txt","r") data = ob1.read().decode("cp1250") ob1.close() ob2 = open("krakatit3.txt","w") ob2.write(data.encode('utf8')) ob2.close() obsluha = open("krakatit2.txt","r") data = obsluha.read() #print(data) obsluha.close() slovo = "smrt" with open("krakatit2.txt") as obsluha: for radek in obsluha: radek = radek.rstrip() if slovo in radek.lower(): print(radek)