subject

Can you explain this code
sentence= input(" enter a sentence with no puncatuation: > ")
sentence= sentence. lower()
keyword= input(" input a word from the sentence: > ")
keyword= keyword. lower()
words= sentence. split(' ')
for (i, subword) in enumerate(words):
if(subword == keyword):
print(i+1)
break
else:
print("error this word isnt in the sentence")

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
What is added to the < meta > tag to describe the encoding type?
Answers: 2
question
Computers and Technology, 22.06.2019 16:00
Why should characters such as / \ " ' * ; - ? [ ] ( ) ~ ! $ { } < > # @ & | space, tab, and newline be avoided in file names?
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
1. before plugging in a new device to a computer you should unplug all other devices turn off the computer turn on the computer 2. many of the maintenance tools for a computer can be found in the control panel under administrative tools display personalization
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
You know the right answer?
Can you explain this code
sentence= input(" enter a sentence with no puncatuation: > ")<...
Questions
question
Mathematics, 26.11.2020 07:40
question
Biology, 26.11.2020 07:40
question
English, 26.11.2020 07:40
question
Social Studies, 26.11.2020 07:40
question
Mathematics, 26.11.2020 07:40
question
Mathematics, 26.11.2020 07:40
question
Health, 26.11.2020 07:40
question
Mathematics, 26.11.2020 07:40
Questions on the website: 13722363