python replace character if isalpha isnum code example Example: isaplha in python str = "abc" print(str.isalpha())