Python riddle

Daniel Schüle uval at rz.uni-karlsruhe.de
Tue Dec 6 03:12:12 CET 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