my_string = "This is a string that contains 123" if my_string.isdigit(): print("Contains a number") else: print("Does not contain a number")