Hello,--
I don't know how can i do to change to write python function
I want to following code change to write python function or change to write recursive definition
>>> y = [10, 12, [13, [14, 9], 16], 7]
>>> z = copy.deepcopy(y)
>>> y
[10, 12, [13, [14, 9], 16], 7]
>>> z
[10, 12, [13, [14, 9], 16], 7]
>>> z[2][1][1]
9
>>> z[2][1][1] = 88
>>> z
[10, 12, [13, [14, 88], 16], 7]
[10, 12, [13, [14, 9], 16], 7]
>>>
this is my use function but not work:
def foo(x):
list = []
if isinstance(x, list):
for i in x:
elem = i
return list + foo(i)
else:
return 1
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cf982ef6-1398-4292-9001-eab418f2035a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.