python for else statement test

In [37]: for i in xrange(10):
   ....:     print i
   ....:     if i>4:
   ....:         break
   ....: else:
   ....:     print i
   ....:     print hh
   ....:     
   ....:     
0
1
2
3
4
5
原文地址:https://www.cnblogs.com/lexus/p/1843581.html