how to check if string has a character in python code example
Example 1: python check if character is letter
>>> 'A'.isalpha()
True
>>> '1'.isalpha()
False
Example 2: python check if string in string
if "blah" not in somestring:
continue
Example 3: check if string contains python
>>> str = "Messi is the best soccer player"
>>> "soccer" in str
True
>>> "football" in str
False