import re # Outputs "Matched!" if re.search(r"[A-Z]", "Sajad"): print("Matched!") else: print("Not matched!")