On Thursday, September 26, 2013 4:54:22 AM UTC+5:30, Arturo B wrote:
> So I know what recursion is, but I don't know how is
>
>flatten(i)
>
> evaluated, what value does it returns?
There is a folklore in CS that recursion is hard
[To iterate is human, to recurse divine
On Thursday, September 26, 2013 7:23:47 AM UTC-7, Neil Cerutti wrote:
> On 2013-09-26, Neil Cerutti wrote:
>
> > def flatten(seq):
>
> >
>
> > [1] http://en.wiktionary.org/wiki/bikeshed
>
>
>
> In that spirit, it occurs to me that given current Python
>
> nomenclature, 'flattened' would be
On 2013-09-26, Neil Cerutti wrote:
> def flatten(seq):
>
> [1] http://en.wiktionary.org/wiki/bikeshed
In that spirit, it occurs to me that given current Python
nomenclature, 'flattened' would be a better name.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/python-list
On 2013-09-25, Arturo B wrote:
> Hi, I'm doing Python exercises and I need to write a function
> to flat nested lists as this one:
>
> [[1,2,3],4,5,[6,[7,8]]]
>
> To the result:
>
> [1,2,3,4,5,6,7,8]
>
> So I searched for example code and I found this one that uses
> recursion (that I don't under
On Thursday, September 26, 2013 4:54:22 AM UTC+5:30, Arturo B wrote:
> So I know what recursion is, but I don't know how is
>
>flatten(i)
>
> evaluated, what value does it returns?
When you are a noob, who do you ask? The gurus.
When you are a guru who do you ask? The co
On 9/25/2013 7:24 PM, Arturo B wrote:
Hi, I'm doing Python exercises and I need to write a function to flat nested
lists
as this one:
[[1,2,3],4,5,[6,[7,8]]]
To the result:
[1,2,3,4,5,6,7,8]
So I searched for example code and I found this one that uses recursion (that I
don't understand):
On 25/9/2013 19:24, Arturo B wrote:
> Hi, I'm doing Python exercises and I need to write a function to flat nested
> lists
> as this one:
>
> [[1,2,3],4,5,[6,[7,8]]]
>
> To the result:
>
> [1,2,3,4,5,6,7,8]
>
> So I searched for example code and I found this one that uses recursion (that
> I do
On Wed, 25 Sep 2013 16:24:22 -0700, Arturo B wrote:
> Hi, I'm doing Python exercises and I need to write a function to flat
> nested lists as this one:
>
> [[1,2,3],4,5,[6,[7,8]]]
>
> To the result:
>
> [1,2,3,4,5,6,7,8]
>
> So I searched for example code and I found this one that uses recursi
On 26/09/2013 00:24, Arturo B wrote:
Hi, I'm doing Python exercises and I need to write a function to flat nested
lists
as this one:
[[1,2,3],4,5,[6,[7,8]]]
To the result:
[1,2,3,4,5,6,7,8]
So I searched for example code and I found this one that uses recursion (that I
don't understand):
d
On Wednesday, September 25, 2013 4:24:22 PM UTC-7, Arturo B wrote:
> Hi, I'm doing Python exercises and I need to write a function to flat nested
> lists
> So I know what recursion is, but I don't know how is
>
>flatten(i)
>
> evaluated, what value does it returns?
>
Hi, I'm doing Python exercises and I need to write a function to flat nested
lists
as this one:
[[1,2,3],4,5,[6,[7,8]]]
To the result:
[1,2,3,4,5,6,7,8]
So I searched for example code and I found this one that uses recursion (that I
don't understand):
def flatten(l):
ret = []
for i
11 matches
Mail list logo