import re word="한글과english" reg = re.compile(r'[ㄱ-ㅎa-zA-Z]') if reg.match(word): print("It is an alphabet") else: print("It is not an alphabet")