dhawanpawa...@gmail.com writes: > n=6 > x=1 > while x<=n: > print "*"*x > x+=1 > while n>=x: > n=n-1 > print "*"* n > > > Only first loop is executing not the second one?
It's a basic fact about while loops that after the loop the condition is false. The two conditions x <= n and n >= x are equivalent. -- https://mail.python.org/mailman/listinfo/python-list