Op 24-11-15 om 15:34 schreef Chris Angelico: > On Wed, Nov 25, 2015 at 1:24 AM, Antoon Pardon > <antoon.par...@rece.vub.ac.be> wrote: >>> Start thinking of it as a constructor call rather than a literal, and >>> you'll get past most of the confusion. >> >> That doesn't change the fact it does look like a literal and not like >> a constructor. > > Then explain how this is a literal: > > squares = [x*x for x in range(int(input("How far? ")))]
So are you saying () isn't a literal because (x * x for x in range(int(input("How far? ")))) isn't a literal? -- Antoon. -- https://mail.python.org/mailman/listinfo/python-list