Nov-04-2019, 04:03 PM
Howdy, this is not homework rather I want to know if its possible regardless of how inefficient the process is. Im attempting to create a function that checks if a string contains a digit and if it does prints out saying "Has no Digits: False" and allows to user to indefinitely.
I just cant quite work out how to loop back so the "s" input to make in indefinite
I just cant quite work out how to loop back so the "s" input to make in indefinite
def strchk(): s = input(("Enter a string: ")) x = str.isdigit(s) while x == True: print(("Has no Digits: False")) if x == False: print(("Has no Digits: True")) strchk()