Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

to compare a part of a string to string

xs = ['abc-123', 'def-456', 'ghi-789', 'abc-456']

if any("abc" in s for s in xs):
    ...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #part #string #string
ADD COMMENT
Topic
Name
8+6 =