subject

Write a python function that takes a string of words separated by spaces (assume no punctuation or capitalization) and a "target" phrase, and shows all the positions of the target phrase in the string of words. for example, if the string is: we dont need no education we dont need no thought control no we dont and the target phrase is "dont", then your function should return the list [1, 6, 13] because "dont" appears at the 1st, 6th, and 13th position in the string. another example of target phrase is "we dont" which should give [0, 5, 12] as the result. we start counting positions of words in the string from 0. your function should return false if the target phrase doesn't appear in the string.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:00
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
How do i get rid of my member ship for
Answers: 2
You know the right answer?
Write a python function that takes a string of words separated by spaces (assume no punctuation or c...
Questions
question
Mathematics, 30.11.2020 20:50
question
History, 30.11.2020 20:50
question
Physics, 30.11.2020 20:50
Questions on the website: 13722367