0

Except-syntax error

I m getting syntax error. while using a except function in python 2.74 I'm using linux. what I do except zerodivisionerror: print ('wrong') what I missed

23rd Nov 2017, 11:54 AM
Ponraj Hbk
Ponraj Hbk - avatar
7 Answers
+ 1
Hello, Python is Case sensitive as far as I know. try this: try: print('your code') except ZeroDivisionError: print('Handling') best regards robert
23rd Nov 2017, 12:05 PM
Robert Meichsner
Robert Meichsner - avatar
+ 1
what' s the full error message?
23rd Nov 2017, 12:09 PM
Robert Meichsner
Robert Meichsner - avatar
0
I tried that too bro. but got same any compile error
23rd Nov 2017, 12:07 PM
Ponraj Hbk
Ponraj Hbk - avatar
0
except: ^ syntax error :invalid syntax
23rd Nov 2017, 12:20 PM
Ponraj Hbk
Ponraj Hbk - avatar
0
I'll get this error only if I miss "try:" before except:
23rd Nov 2017, 12:28 PM
Robert Meichsner
Robert Meichsner - avatar
0
oh I will try again brother
23rd Nov 2017, 12:46 PM
Ponraj Hbk
Ponraj Hbk - avatar
0
new error. indentation error :unindent does not match any outer indentation level
24th Nov 2017, 8:08 AM
Ponraj Hbk
Ponraj Hbk - avatar