[Tutor] taking support of strings in solving numerical problems
Cameron Simpson
cs at cskk.id.au
Mon Oct 26 00:55:26 EDT 2020
On 26Oct2020 07:45, Manprit Singh <manpritsinghece at gmail.com> wrote:
>But still i raise objection, according to me if i am calling and then
>executing ser_gen(a, b) for any integer value less than 1 , for the below
>written generator function definition, it must provide an empty iterable,
>the definition is given below:
>
>def ser_gen(no, order):
> f_no = no
> for i in range(order):
> yield f_no
> f_no = f_no*10 + no
>
>all(ser_gen(9, -3)) Returns True that says, there is an empty iterable
>inside all( )
Returns True for me, too. Which is expected behaviour.
It is not clear to me what your objection is about.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Tutor
mailing list