It seems both of the below codes are printing the same, then what is the need of "else" block after "for" loop in python.
Code 1:
for i in range(10):
print i
else:
print "after for loop"
Code 2:
for i in range(10):
print i
print "after for loop"
Thanks in advance.