Not getting output

BartC bc at freeuk.com
Tue Oct 11 14:45:05 EDT 2016


On 11/10/2016 18:57, dhawanpawan32 at gmail.com wrote:
> 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
>

Try adding:

bg()

at the end in order to call bg.

-- 
Bartc



More information about the Python-list mailing list