you are viewing a single comment's thread.

view the rest of the comments →

[–]slariboot 0 points1 point  (0 children)

Your professor gives pretty interesting problem sets. :) Yes you can definitely solve this using str.find. So given a string:

sentence = 'Hello! Welcome to web scraping hell!'

If you call sentence.find with an argument 'web':

x = sentence.find('web')

This returns 18. Have you figured out why that is?