def ck_no(prompt): while True: try: lst = (2,3,4) if prompt not in lst: print("not in list") raise ValueError else: print("In the List") except ValueError as e: print(e) return
ck_no(int(input(print("Enter a No: "))))
Enter a No:
After calling the function it prompts the user to enter the no. But it prints none. Beside none if enter the no it accepts and the pgm continues. How to correct this none.
I want to prompt the user again and again to enter different nos. How to do this?