2 Comments

  1. Thanks for your support.

    Please, I am trying to create a password checker in Python that will check that a particular word is contained in whatever the user feeds as his password.

    For example:
    If the real password is john and the person has entered john bull as his password.

    Is there a way to write that code??

    • var_string = “my name is John”
      secretWord = “john”

      if secretWord in var_string.split():
      print(‘seceret word found’)
      else:
      print(“not found”)

      The split function will separate words based on spaces so that you can search whole words

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.