Computers and Technology

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"

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:40, lizzlegnz999
Respecting individual differencespre-test active2time remaining48: 47nina is exploring her gender identity and sexual orientationwhich best describes how the role of the media might influence nina during this time in her life? the media would her decide because television shows are always unbiased about gender issues and do notstereotypethe media could make things difficult for her because television sometimes portrays rigid ideas about gender roles. all forms of media will her decide because the media always portrays rigid ideas about gender roles. all forms of media will make things easy for her because the media always portrays open and fair ideas about gender roles.
Answers: 1
image
Computers and Technology, 22.06.2019 15:00, miracle9704
Atool that matches persoal skills qualities interests and talets to a career is called a
Answers: 1
image
Computers and Technology, 22.06.2019 17:30, jonquil201
Where would you click to edit the chart data?
Answers: 1
image
Computers and Technology, 22.06.2019 19:30, ibrahimuskalel
Avariable definition defines the name of a variable that will be used in a program, as well as
Answers: 3
Do you know the correct 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, 10.06.2020 19:57
Konu
Mathematics, 10.06.2020 19:57