From 89aa001497c9b1b1e2d546737d52e153f1859643 Mon Sep 17 00:00:00 2001 From: surister Date: Mon, 20 Jan 2020 16:17:46 +0100 Subject: [PATCH] Add details in python answer about error handling. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index bcf55ff..fde2c61 100644 --- a/README.md +++ b/README.md @@ -3244,9 +3244,8 @@ If user enter a non-integer value it will raise exception and using except it wi while True: try: a = int(input("please enter an integer value: ")) - print(a) break - except: + except ValueError: print("Ops! Please enter a valid integer value.") ```