Ah yes it's an iterable not a condition. Sorry about that. 😛😛 Souvik flutter dev
On Sat, Apr 11, 2020, 6:38 AM Chris Angelico <ros...@gmail.com> wrote: > On Sat, Apr 11, 2020 at 11:04 AM Souvik Dutta <souvik.vik...@gmail.com> > wrote: > > > > How about completely removing the need for an if statement by allowing > for multiple conditions to be inserted in the for loop?? That would make > reading and writing a lot easier. Like the count problem could be rewritten > as > > for (a in chars and <the other list> ): > > count+=1 > > > > A loop fundamentally has to have an iterable and an assignment target > (usually a variable). That's not a condition, it's a loop. The only > reason it looks like multiple conditions is that the "in" keyword is > doing two slightly different things here :) > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list