Python Forum
how to check if string contains ALL words from the list?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to check if string contains ALL words from the list?
#1
Hi guys,

How can i check if string contains all words from the list?

some_string = 'there is a big apple, but i like banana more than orange'


some_list = ['apple', 'banana', 'orange']
It should return True
Reply


Messages In This Thread
how to check if string contains ALL words from the list? - by zarize - Jul-22-2020, 04:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with to check an Input list data with a data read from an external source sacharyya 3 389 Mar-09-2024, 12:33 PM
Last Post: Pedroski55
  [solved] list content check paul18fr 6 676 Jan-04-2024, 11:32 AM
Last Post: deanhystad
  Function to count words in a list up to and including Sam Oldman45 15 6,521 Sep-08-2023, 01:10 PM
Last Post: Pedroski55
  Pulling Specifics Words/Numbers from String bigpapa 2 748 May-01-2023, 07:22 PM
Last Post: bigpapa
  How do I check if the first X characters of a string are numbers? FirstBornAlbratross 6 1,506 Apr-12-2023, 10:39 AM
Last Post: jefsummers
  check if element is in a list in a dictionary value ambrozote 4 1,954 May-11-2022, 06:05 PM
Last Post: deanhystad
  How to check if a list is in another list finndude 4 1,831 Jan-17-2022, 05:04 PM
Last Post: bowlofred
  Extract a string between 2 words from a text file OscarBoots 2 1,862 Nov-02-2021, 08:50 AM
Last Post: ibreeden
Question Problem: Check if a list contains a word and then continue with the next word Mangono 2 2,485 Aug-12-2021, 04:25 PM
Last Post: palladium
  Generate a string of words for multiple lists of words in txt files in order. AnicraftPlayz 2 2,789 Aug-11-2021, 03:45 PM
Last Post: jamesaarr

Forum Jump:

User Panel Messages

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