Re: what is the difference between one-line-operation and 2-line-operation

2016-04-25 Thread Gary Herron
On 04/25/2016 07:13 AM, oyster wrote: for a simple code [code] vexList = [1, 2, 3] print('vexList', list(vexList)) vexList=map(lambda e: e+1, vexList) print('vexList', list(vexList)) vexList = list(vexList) print('vexList', list(vexList)) vexList=map(lambda e: e*2,vexList) print('vexList', lis

Re: what is the difference between one-line-operation and 2-line-operation

2016-04-25 Thread Michael Torrie
On 04/25/2016 08:13 AM, oyster wrote: > so, what produces this difference between py2 and py3 in nature? is > there more examples? where can I find the text abiut his difference? One thing I see is that both your py2 and py3 examples are treating print as a function. It's only a function in Py3.

Re: what is the difference between one-line-operation and 2-line-operation

2016-04-25 Thread Jussi Piitulainen
oyster writes: - - > I found > type(map(lambda e: e, vexList)) is in py2 > type(map(lambda e: e, vexList)) is in py3 > > so, what produces this difference between py2 and py3 in nature? is > there more examples? where can I find the text abiut his difference? Yes, there are more ways obtain o

what is the difference between one-line-operation and 2-line-operation

2016-04-25 Thread oyster
for a simple code [code] vexList = [1, 2, 3] print('vexList', list(vexList)) vexList=map(lambda e: e+1, vexList) print('vexList', list(vexList)) vexList = list(vexList) print('vexList', list(vexList)) vexList=map(lambda e: e*2,vexList) print('vexList', list(vexList)) [/code] py27 says [quote]