Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python list contains substring

str_list = ["one", "two", "three"]
substr = "wo"
if any(substr in str for str in str_list):
	print('Yes!')
 
PREVIOUS NEXT
Tagged: #python #list #substring
ADD COMMENT
Topic
Name
8+1 =