I want use try...catch in Python but Python give me an error what's can I do?
try:
input('enter your number');
catch:
print('please give integer');
try/catch in python is try/except.
you can use try/except like this:
try:
input('enter your number');
except expression:
print('please give integer');
try:
int(input('enter your number'));
except ValueError:
print('please give integer');
exceptinstead ofcatchexceptis mostly explained using the words "catch exceptions" in the docs and hence I guess you used the wordcatch;)