Python riddle

Daniel Schüle uval at rz.uni-karlsruhe.de
Mon Dec 5 21:12:12 EST 2005


SPE - Stani's Python Editor wrote:
> I know that this code is nonsense, but why does this print 'Why?'
> 
> a = 1
> if a >2:
>     try:
>         5/0
>     except:
>         raise
> else:
>     print 'why?'
> 

because 1 is not greater than 2 I suppose :)




More information about the Python-list mailing list