continue和pass測试

>>> for i in range(1,10):
	print i
	try:int('sdfa')
	except:pass

	
1
2
3
4
5
6
7
8
9


>>> for i in range(1,10):
	print i
	try:int('sdfa')
	except:continue

	
1
2
3
4
5
6
7
8
9
>>> 


能够看出pass,continue在该情况下是同样的效果的
posted @ 2017-08-03 13:13  wzjhoutai  阅读(141)  评论(0编辑  收藏  举报