zdanie=""" Sing, O goddess, the anger of Achilles son of Peleus, that brought countless ills upon the Achaeans. Many a brave soul did it send hurrying down to Hades, and many a hero did it yield a prey to dogs and vultures, for so were the counsels of Jove fulfilled from the day on which the son of Atreus, king of men, and great Achilles, first fell out with one another. And which of the gods was it that set them on to quarrel? It was the son of Jove and Leto; for he was angry with the king and sent a pestilence upon the host to plague the people, because the son of Atreus had dishonoured Chryses his priest. Now Chryses had come to the ships of the Achaeans to free his daughter, and had brought with him a great ransom: moreover he bore in his hand the sceptre of Apollo wreathed with a suppliant's wreath and he besought the Achaeans, but most of all the two sons of Atreus, who were their chiefs. "Sons of Atreus," he cried, "and all other Achaeans, may the gods who dwell in Olympus grant you to sack the city of Priam, and to reach your homes in safety; but free my daughter, and accept a ransom for her, in reverence to Apollo, son of Jove." On this the rest of the Achaeans with one voice were for respecting the priest and taking the ransom that he offered; but not so Agamemnon, who spoke fiercely to him and sent him roughly away. "Old man," said he, "let me not find you tarrying about our ships, nor yet coming hereafter. Your sceptre of the god and your wreath shall profit you nothing. I will not free her. She shall grow old in my house at Argos far from her own home, busying herself with her loom and visiting my couch; so go, and do not provoke me or it shall be the worse for you." """ zdanie=zdanie.replace(',','') zdanie=zdanie.replace('"','') zdanie=zdanie.replace('\n','') zdanie=zdanie.replace('.','') zdanie=zdanie.replace('?','') zdanie=zdanie.replace(':','') zdanie=zdanie.replace(';','') print('Przeszukiwane zdanie po wyczyszczeniu:\n\n===============\n', zdanie, '\n===============\n\n') wyrazy=zdanie.split(' ') print("\n\nZdanie po transformacji na listę:\n\n===============\n", wyrazy, '\n===============\n\n') poszukiwanyWyraz=input('Wpisz wyraz, który chcesz wyszukać:') liczbaWystapien=0 for kazdyWyraz in wyrazy: if kazdyWyraz==poszukiwanyWyraz: liczbaWystapien+=1 print(f'\n\nWyraz\'{poszukiwanyWyraz}\'wystąpił w tekście {liczbaWystapien} raz(y).\n') input('\n\nNaciśnij ENTER, aby zakończyć\n')