# -*- coding: utf-8 -*-
# Author Frank Hu
# iDoulist Function 1 - process

# copy a list into a new list, implement function 0 
def copy(input_list):
	new_list = input_list
	return new_list

# combine two list
def combine(list1, list2):
    list_combine = list1
    # 测试发现列表赋值传递的是指针! 使用这行代码会导致 list1 的值在函数运行后发生变化
    for i in list2:
        list_combine.append(i)
    remove_duplicate_element(list_combine) #注意这里我重用了已有的轮子(去重函数)
    return list_combine

def remove_duplicate_element(list):
    i = 0
    while i <= len(list) - 1:
        j = i + 1
        while j <= len(list) - 1:
            if list[i] == list[j]:
                del list[j]
            j += 1
        i += 1

# common elements in two list
def common(list1,list2):
    list_common = []
    for i in list1:
        for j in list2:
            if j == i:
                list_common.append(j)
    return list_common
@@ -252,65 +252,62 @@
 ne =
+ %5B%5D%0A    for i in
  list1
+:
 %0A    
-# %E6%B5%8B%E8%AF%95%E5%8F%91%E7%8E%B0%E5%88%97%E8%A1%A8%E8%B5%8B%E5%80%BC%E4%BC%A0%E9%80%92%E7%9A%84%E6%98%AF%E6%8C%87%E9%92%88! %E4%BD%BF%E7%94%A8%E8%BF%99%E8%A1%8C%E4%BB%A3%E7%A0%81%E4%BC%9A%E5%AF%BC%E8%87%B4 list1 %E7%9A%84%E5%80%BC%E5%9C%A8%E5%87%BD%E6%95%B0%E8%BF%90%E8%A1%8C%E5%90%8E%E5%8F%91%E7%94%9F%E5%8F%98%E5%8C%96
+    list_combine.append(i)
 %0A   

revise combine function, list pointer issue