Not getting output

2016-10-11 Thread dhawanpawan32
def abc(a,b):
l=[]
for i in range(a,b+1):
if i%2!=0:

l.append(i)
print l
return 1

def bg():
y=abc(11,31)
print y
I am not getting the output, but if i call method abc outside the function then 
it's coming
-- 
https://mail.python.org/mailman/listinfo/python-list


while loop

2016-10-11 Thread dhawanpawan32

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?
-- 
https://mail.python.org/mailman/listinfo/python-list