check if string only has characters python code example Example: python check if character is letter >>> 'A'.isalpha() True >>> '1'.isalpha() False