Answers for "how to check if any part of a string has a certain character python"

20

if substring not in string python

fullstring = "StackAbuse"
substring = "tack"

if fullstring.find(substring) != -1:
    print "Found!"
else:
    print "Not found!"
Posted by: Guest on May-01-2020
0

python check if string contains symbols

any(not c.isalnum() for c in string)
Posted by: Guest on September-23-2021

Code answers related to "how to check if any part of a string has a certain character python"

Python Answers by Framework

Browse Popular Code Answers by Language