Problem : Generator
acharbly at gmail.com
Fri Feb 15 04:27:08 EST 2019
I get list object instead gen obj
On Fri, 15 Feb 2019, 13:57 Chris Angelico <rosuav at gmail.com wrote:
> On Fri, Feb 15, 2019 at 6:57 PM Prahallad Achar <acharbly at gmail.com>
> > How about this
> > List1=[ 1,2,3,4]
> > Rever_gen = ( x*x for x in list1, reversed = True)
> > Rever_gen gets generator object and iterating it now gets reverse order..
> > Am I correct here? Suggest me
> How about reversed(list1) ?
More information about the Python-list