def func while and or if print and or i-1 else print end of loop

1
2
3
4
5
6
7
def func(a, b=0):
i=a
while (a<b and i<=b) or a>b:
if i%2 != 0:
print i
i = (a<b and i+1) or i-1
else: print 'end of loop'