Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if else repeating
#6
The set() approach will only find matching words if there are matches to be found. "tomato" does not match "Tomato", nor does it match "tomatoes" or "I like that with tomato please". Verify that "words" is a list of words and not a string that contains words.

My "any" example finds substrings in a word, not words in a list. It is not directly applicable to your problem, but it does a nice job demonstrating how "any" works.
Reply


Messages In This Thread
if else repeating - by Frankduc - Jul-09-2022, 03:39 PM
RE: if else repeating - by Gribouillis - Jul-09-2022, 04:06 PM
RE: if else repeating - by Frankduc - Jul-09-2022, 04:29 PM
RE: if else repeating - by deanhystad - Jul-09-2022, 08:55 PM
RE: if else repeating - by Frankduc - Jul-10-2022, 02:43 PM
RE: if else repeating - by deanhystad - Jul-10-2022, 05:57 PM
RE: if else repeating - by Frankduc - Jul-11-2022, 02:26 PM
RE: if else repeating - by ndc85430 - Jul-11-2022, 02:47 PM
RE: if else repeating - by Frankduc - Jul-11-2022, 08:28 PM
RE: if else repeating - by deanhystad - Jul-12-2022, 01:57 AM
RE: if else repeating - by Frankduc - Jul-12-2022, 07:50 PM
RE: if else repeating - by deanhystad - Jul-13-2022, 09:47 AM
RE: if else repeating - by Frankduc - Jul-14-2022, 12:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Why is 2/3 not just .666 repeating? DocFro 4 817 Dec-12-2023, 09:09 AM
Last Post: buran
  repeating a user_input astral_travel 17 2,497 Oct-26-2022, 04:15 PM
Last Post: astral_travel
  factorial, repeating Aldiyar 4 2,897 Sep-01-2020, 05:22 PM
Last Post: DPaul
  Repeating equations Tbot100 2 3,342 May-29-2019, 02:38 AM
Last Post: heiner55
  repeating for loop Kaldesyvon 5 3,963 Dec-06-2018, 08:00 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020