Update u2/list_ops.py
This commit is contained in:
parent
4eb1bb79aa
commit
00e66cdf61
@ -1,14 +1,14 @@
|
|||||||
def length(l):
|
def length(l):
|
||||||
count = 0
|
count = 0
|
||||||
for c in range l:
|
for item in range l:
|
||||||
count +=1
|
count +=1
|
||||||
return count
|
return count
|
||||||
|
|
||||||
def append(list1, list2):
|
def append(list1, list2):
|
||||||
list = []
|
result = []
|
||||||
for item in list1:
|
for item in list1:
|
||||||
list += [item]
|
result += [item]
|
||||||
for item in list2:
|
for item in list2:
|
||||||
list += [item]
|
result += [item]
|
||||||
return list
|
return result
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user