2014年6月13日金曜日 12時47分19秒 UTC+9 hito koto:
> Hi, all
>
>
>
> I want to make the function use while statement,and without a deepcopy
> functions.
>
>
>
> this is my use deepcopy function correct codes, So, how can i to do a
> different way and use while statement:
>
>
>
> def foo(x):
>
> if not isinstance(x, list):
>
> return x
>
> return [foo(y) for y in x]
I write this code but this is not copy:
maybe noe more write while statements: but i can't.
def foo(x):
y = []
i = len(x)-1
while i >= 0:
y.append(x[i])
i -= 1
return y
--
https://mail.python.org/mailman/listinfo/python-list