i am trying to write a program that checks the entered number and print if it valid the number also has to limited to 9 characters and has to be a callable function
atempt = 0 num = "" def validnum(): num = input(" ") while atempt != 0: num = input(" ") if num == num[0:9].isdigit: print('valid num') else: print ('Invalid num') validnum()