Relative Content

Tag Archive for pythonexception

Difference between ‘except’ and ‘except Exception’ in Python [duplicate]

This question already has answers here: Difference between except: and except Exception as e: (5 answers) Difference between except: and except Exception: (2 answers) Closed 1 min ago. Is there any difference between try: 1 # some exception except: pass and try: 1 # some exception except Exception: pass Please note: This question is not […]

I want to get an exception in the variable anyvalue

I want to get an exception in the anyvalue variable if i put a value like float (with any value too, but neihter text or int), but it doesn’t work
it only works in the following variables, if i put any text in the anyvalue (on which i want to work, the first variable of the script), it does a thing, and the same with number, but if i put a float value(for example) it doesn’t give me the exception and takes it as if it were a int