On Monday, February 26, 2018 at 12:57:25 PM UTC+5:30, Chris Angelico wrote: > On Mon, Feb 26, 2018 at 5:19 AM, <arya.kumar2...@gmail.com> wrote: > > Why we don’t use: > > > > for _ in _ in _ > > > > Instead of > > > > for _ in _: > > for _ in _: > > > > Ex: > > > > Names = ["Arya","Pupun"] > > > > for name in Names: > > for c in name: > > print(c) > > > > instead use: > > > > for c in name in Names: > > print(c) > > Because programming is all about building up a program from > primitives. The number of times when we need this kind of nested loop > (with absolutely nothing in between the loops) is way too small to > justify dedicated syntax. > > ChrisA
Thank you. -- https://mail.python.org/mailman/listinfo/python-list