subject

How do you check if the words exist in the sentence in python?
so far i have the_sentence = ("i love chocolate and chocolate loves me")
sentence = the_sentence. split() print(sentence) sentence_1 = raw_input("enter a word") def "word": if word in the_sentence: print "yes" elif word not in the_sentence: print "nope"

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:30, noah2o2o
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 2
image
Computers and Technology, 23.06.2019 06:30, Zieken993
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
image
Computers and Technology, 24.06.2019 11:30, smann211
Convert 11001110(acdd notation) into decimal
Answers: 2
image
Computers and Technology, 24.06.2019 12:00, exoticbunnylover123
Which spreadsheet operation does a look function perform?
Answers: 1
You know the right answer?
How do you check if the words exist in the sentence in python?
so far i have the_sentence =...

Questions in other subjects:

Konu
Mathematics, 27.01.2020 21:31
Konu
Geography, 27.01.2020 21:31