id
stringlengths
35
39
content
stringlengths
44
3.85k
max_stars_repo_path
stringlengths
52
57
refactory_data_question_3_correct_3_185
def remove_extras(lst): if lst == []: return [] sub_list = [] for elem in lst: if elem not in lst[lst.index(elem)+1:]: return lst elif elem in lst[lst.index(elem)+1:]: sub_list += lst[lst.index(elem)+1:] while elem in sub_list: sub_list.remove(elem) return lst[:lst.index(elem)+1] + sub_list
./refactory/data/question_3/code/correct/correct_3_185.py
refactory_data_question_3_correct_3_272
def remove_extras(lst): answer = [] for i in lst: unique = True for a in answer: if i == a: unique = False break if unique: answer += [i] return answer
./refactory/data/question_3/code/correct/correct_3_272.py
refactory_data_question_3_correct_3_482
def remove_extras(lst): re=() uni=[] for ele in lst: if ele not in re: re+=(ele,) uni+=[ele] else: continue return uni
./refactory/data/question_3/code/correct/correct_3_482.py
refactory_data_question_3_correct_3_133
def remove_extras(lst): store = [] for ele in lst: if ele not in store: store += [ele] return store
./refactory/data/question_3/code/correct/correct_3_133.py
refactory_data_question_3_correct_3_247
def remove_extras(lst): x = [] for i in lst: if i not in x: x = x + [i,] else: continue return x
./refactory/data/question_3/code/correct/correct_3_247.py
refactory_data_question_3_correct_3_203
def remove_extras(lst): lst2=[] for x in lst: if x not in lst2: lst2+=[x] return lst2
./refactory/data/question_3/code/correct/correct_3_203.py
refactory_data_question_3_correct_3_189
def remove_extras(lst): if lst==[]: return [] new_lst = [lst[0]] for i in range(0,len(lst)): a=lst[i] for h in range(i,len(lst)): if a!=lst[h]: ele=lst[h] new_lst.append(ele) return new_lst return new_lst
./refactory/data/question_3/code/correct/correct_3_189.py
refactory_data_question_3_correct_3_329
def remove_extras(lst): lst_new = list() for i in lst: if (i in lst_new): continue else: lst_new.append(i) return lst_new
./refactory/data/question_3/code/correct/correct_3_329.py
refactory_data_question_3_correct_3_168
def remove_extras(lst): result = [] for element in lst: if element not in result: result.append(element) return result
./refactory/data/question_3/code/correct/correct_3_168.py
refactory_data_question_3_correct_3_384
def remove_extras(lst): new = [] for i in range(len(lst)): if lst[i] not in new: new.append(lst[i]) return new
./refactory/data/question_3/code/correct/correct_3_384.py
refactory_data_question_3_correct_3_500
def remove_extras(lst): result = [] for i in lst: if i not in result: result.append(i) else: continue return result
./refactory/data/question_3/code/correct/correct_3_500.py
refactory_data_question_3_correct_3_155
def remove_extras(lst): wo_extras = [] for i in lst: if i in wo_extras: continue wo_extras.append(i) return wo_extras pass
./refactory/data/question_3/code/correct/correct_3_155.py
refactory_data_question_3_correct_3_186
def remove_extras(lst): # your code here result = [] for i in lst: if i not in result: result.append(i) return result
./refactory/data/question_3/code/correct/correct_3_186.py
refactory_data_question_3_correct_3_457
def remove_extras(lst): new_lst = [] for i in range(len(lst)): if lst[i] not in new_lst: new_lst += [lst[i]] return new_lst
./refactory/data/question_3/code/correct/correct_3_457.py
refactory_data_question_3_correct_3_242
def remove_extras(lst): new = [] for i in lst: if i not in new: new.append(i) return new
./refactory/data/question_3/code/correct/correct_3_242.py
refactory_data_question_3_correct_3_253
def remove_extras(lst): new = [] for i in lst: if i not in new: new.append(i) return new
./refactory/data/question_3/code/correct/correct_3_253.py
refactory_data_question_3_correct_3_399
def remove_extras(lst): new_lst = [] for i in lst: if i not in new_lst: new_lst.append(i) return new_lst
./refactory/data/question_3/code/correct/correct_3_399.py
refactory_data_question_3_correct_3_472
def remove_extras(lst): empty_list = [] for i in lst: if i not in empty_list: empty_list += [i] return empty_list pass
./refactory/data/question_3/code/correct/correct_3_472.py
refactory_data_question_3_correct_3_023
def remove_extras(lst): output = [] for i in lst: if i not in output: output += [i] return output
./refactory/data/question_3/code/correct/correct_3_023.py
refactory_data_question_3_correct_3_042
def remove_extras(lst): if lst == []: return lst else: one = [lst[0],] for repeat in lst: if repeat not in one: one += [repeat,] return one
./refactory/data/question_3/code/correct/correct_3_042.py
refactory_data_question_3_correct_3_094
def remove_extras(lst): output = [] for entry in lst: if output.count(entry) == 0: output == output.append(entry) return output
./refactory/data/question_3/code/correct/correct_3_094.py
refactory_data_question_3_correct_3_123
def remove_extras(lst): new = [] for x in lst: if x not in new: new += [x,] else: new += [] return new pass
./refactory/data/question_3/code/correct/correct_3_123.py
refactory_data_question_3_correct_3_052
def remove_extras(lst): output = [] for x in lst: if x not in output: output.append(x) return output
./refactory/data/question_3/code/correct/correct_3_052.py
refactory_data_question_3_correct_3_071
def remove_extras(lst): tmp = [] for x in lst: if x not in tmp: tmp.append(x) return tmp
./refactory/data/question_3/code/correct/correct_3_071.py
refactory_data_question_3_correct_3_430
def remove_extras(lst): lst2 = [] for i in lst: if i not in lst2: lst2.append(i) return lst2
./refactory/data/question_3/code/correct/correct_3_430.py
refactory_data_question_3_correct_3_219
def remove_extras(lst): list = [] for i in lst: if i not in list: list.append(i) return list
./refactory/data/question_3/code/correct/correct_3_219.py
refactory_data_question_3_correct_3_392
def remove_extras(lst): new_lst = [] for num in lst: if num not in new_lst: new_lst.append(num) return new_lst
./refactory/data/question_3/code/correct/correct_3_392.py
refactory_data_question_3_correct_3_066
def remove_extras(lst): tmp = [] for x in lst: if x not in tmp: tmp.append(x) return tmp
./refactory/data/question_3/code/correct/correct_3_066.py
refactory_data_question_3_correct_3_331
def remove_extras(lst): new = [] for i in lst: if i not in new: new += [i] else: continue return new
./refactory/data/question_3/code/correct/correct_3_331.py
refactory_data_question_3_correct_3_251
def remove_extras(lst): new_list=[] for value in lst: if value not in new_list: new_list.append(value) return new_list
./refactory/data/question_3/code/correct/correct_3_251.py
refactory_data_question_3_correct_3_496
def remove_extras(lst): s = [] for i in lst: if i not in s: s.append(i) return s
./refactory/data/question_3/code/correct/correct_3_496.py
refactory_data_question_3_correct_3_274
def remove_extras(lst): newlst = [] for item in lst: if item not in newlst: newlst.append(item) return newlst
./refactory/data/question_3/code/correct/correct_3_274.py
refactory_data_question_3_correct_3_195
def remove_extras(lst): seq = [] for i in lst: if i in seq: continue else: seq += [i] return seq
./refactory/data/question_3/code/correct/correct_3_195.py
refactory_data_question_3_correct_3_206
def remove_extras(lst): lst1=[] for i in lst: if i not in lst1: lst1.append(i) return lst1
./refactory/data/question_3/code/correct/correct_3_206.py
refactory_data_question_3_correct_3_136
def remove_extras(lst): new_lst = [] for i in lst: if i not in new_lst: new_lst = new_lst + [i,] else: continue return new_lst
./refactory/data/question_3/code/correct/correct_3_136.py
refactory_data_question_3_correct_3_145
def remove_extras(lst): lst.reverse() for i in lst: if lst.count(i) > 1: lst.remove(i) lst.reverse() return lst
./refactory/data/question_3/code/correct/correct_3_145.py
refactory_data_question_3_correct_3_310
def remove_extras(lst): output = [] for i in lst: if i not in output: output.append(i) return output
./refactory/data/question_3/code/correct/correct_3_310.py
refactory_data_question_3_correct_3_388
def remove_extras(lst): new_lst = [] for num in lst: if num not in new_lst: new_lst.append(num) return new_lst
./refactory/data/question_3/code/correct/correct_3_388.py
refactory_data_question_3_correct_3_546
def remove_extras(lst): new_lst = [] for i in lst: if i not in new_lst: new_lst.append(i) else: continue return new_lst
./refactory/data/question_3/code/correct/correct_3_546.py
refactory_data_question_3_correct_3_396
def remove_extras(lst): if lst == []: return [] else: a =[lst[0]] i = lst[0] for j in range (1,len(lst)): #while lst is not empty if i == lst[j]: continue else: a += [lst[j]] return a
./refactory/data/question_3/code/correct/correct_3_396.py
refactory_data_question_3_correct_3_130
def remove_extras(lst): if lst == []: return [] else: a =[lst[0]] i = lst[0] for j in range (1,len(lst)): #while lst is not empty if i == lst[j]: continue else: a += [lst[j]] return a
./refactory/data/question_3/code/correct/correct_3_130.py
refactory_data_question_3_correct_3_180
def remove_extras(lst): lst2 = [] for i in lst: if i not in lst2: lst2.append(i) return lst2
./refactory/data/question_3/code/correct/correct_3_180.py
refactory_data_question_3_correct_3_508
def remove_extras(lst): l = [] for i in lst: if i not in l: l.append(i) return l
./refactory/data/question_3/code/correct/correct_3_508.py
refactory_data_question_3_correct_3_108
def remove_extras(lst): if lst == []: return lst new_lst = [lst[0],] for e in lst: if e in new_lst: continue else: new_lst.append(e) return new_lst
./refactory/data/question_3/code/correct/correct_3_108.py
refactory_data_question_3_correct_3_254
def remove_extras(lst): a = [] for i in lst: if i not in a: a.append(i) return a
./refactory/data/question_3/code/correct/correct_3_254.py
refactory_data_question_3_correct_3_087
def remove_extras(lst): new_lst = [] for ele in lst: if not (ele in new_lst): new_lst.insert(len(new_lst), ele) return new_lst
./refactory/data/question_3/code/correct/correct_3_087.py
refactory_data_question_3_correct_3_215
def remove_extras(lst): # your code here new_lst = [] for i in lst: if not i in new_lst: new_lst.append(i) return new_lst
./refactory/data/question_3/code/correct/correct_3_215.py
refactory_data_question_3_correct_3_057
def remove_extras(lst): i = 0 while i < len(lst): j = i + 1 while j < len(lst): if lst[i] == lst[j]: lst = lst[:j] + lst[j+1:] else: j += 1 i += 1 return lst
./refactory/data/question_3/code/correct/correct_3_057.py
refactory_data_question_3_correct_3_289
def remove_extras(lst): lst1 = [] for i in lst: if i not in lst1: lst1.append(i) return lst1
./refactory/data/question_3/code/correct/correct_3_289.py
refactory_data_question_3_correct_3_080
def remove_extras(lst): a = () c = () n = len(lst) for i in range(n): for j in range(i,n): if lst[i] == lst[j] and i != j: a += (j,) #j is the jth index of the list else: continue d = tuple(set(a)) #[repeated_index1, repeated_index2] for i in d: c += (lst[i],) lst.reverse() for j in range(len(c)): lst.remove(c[j]) lst.reverse() return lst
./refactory/data/question_3/code/correct/correct_3_080.py
refactory_data_question_3_correct_3_327
def remove_extras(lst): lst_new = list() for i in lst: if (i in lst_new): continue else: lst_new.append(i) return lst_new
./refactory/data/question_3/code/correct/correct_3_327.py
refactory_data_question_3_correct_3_509
def remove_extras(lst): newlst=[] for i in lst: if i not in newlst: newlst.append(i) return newlst
./refactory/data/question_3/code/correct/correct_3_509.py
refactory_data_question_3_correct_3_459
def remove_extras(lst): newLst=[] for i in lst: if i not in newLst: newLst.append(i) else: continue return newLst
./refactory/data/question_3/code/correct/correct_3_459.py
refactory_data_question_3_correct_3_049
def remove_extras(lst): new_lst = [] for i in lst: if i not in new_lst: new_lst.append(i) return new_lst
./refactory/data/question_3/code/correct/correct_3_049.py
refactory_data_question_3_correct_3_208
def remove_extras(lst): for i in lst: if lst.count(i) > 1: left = lst[:lst.index(i)+1] right = lst[lst.index(i)+1:] right.remove(i) lst = left + right return lst
./refactory/data/question_3/code/correct/correct_3_208.py
refactory_data_question_3_correct_3_456
def remove_extras(lst): a = [] for i in lst: a = a+[i,] if a.count(i)>1: a.pop() return a
./refactory/data/question_3/code/correct/correct_3_456.py
refactory_data_question_3_correct_3_431
def remove_extras(lst): n = 0 while n < len(lst): if lst[n] in lst[n+1:]: ext = lst[n+1:] ext.remove(lst[n]) lst = lst[:n+1] + ext else: n = n + 1 return lst
./refactory/data/question_3/code/correct/correct_3_431.py
refactory_data_question_3_correct_3_243
def remove_extras(lst): new_lst = [] for i in lst: if not i in new_lst: new_lst.append(i) return new_lst
./refactory/data/question_3/code/correct/correct_3_243.py
refactory_data_question_3_correct_3_513
def remove_extras(lst): new_lst = [] for i in lst: if i not in new_lst: new_lst.append(i) return new_lst
./refactory/data/question_3/code/correct/correct_3_513.py
refactory_data_question_3_correct_3_246
def remove_extras(lst): s =[] for i in lst: if i not in s: s = s +[i] lst.clear() lst.extend(s) return lst
./refactory/data/question_3/code/correct/correct_3_246.py
refactory_data_question_3_correct_3_535
def remove_extras(lst): new = [] for x in lst: if x not in new: new.append(x) return new
./refactory/data/question_3/code/correct/correct_3_535.py
refactory_data_question_3_correct_3_323
def remove_extras(lst): non_extra = () count = 0 for el in lst: if el not in non_extra: non_extra += (el,) else: continue lst = list(non_extra) return lst
./refactory/data/question_3/code/correct/correct_3_323.py
refactory_data_question_3_correct_3_176
def remove_extras(lst): res= [] for i in lst: if res.count(i) == 0: res = res + [i] else: res = res return res
./refactory/data/question_3/code/correct/correct_3_176.py
refactory_data_question_3_correct_3_539
def remove_extras(lst): a = [] for i in lst: if i in a: continue else: a.append(i) return a
./refactory/data/question_3/code/correct/correct_3_539.py
refactory_data_question_3_correct_3_238
def remove_extras(lst): # your code here z=[] for i in lst: if i in z: continue else: z.append(i) return z
./refactory/data/question_3/code/correct/correct_3_238.py
refactory_data_question_3_correct_3_451
def remove_extras(lst): new_lst=[] for i in lst: if i not in new_lst: new_lst.append(i) return new_lst
./refactory/data/question_3/code/correct/correct_3_451.py
refactory_data_question_3_correct_3_356
def remove_extras(lst): newlist = [] for i in lst: if i not in newlist: newlist.append(i) return newlist
./refactory/data/question_3/code/correct/correct_3_356.py
refactory_data_question_3_correct_3_280
def remove_extras(lst): answer = [] for i in lst: unique = True for a in answer: if i == a: unique = False break if unique: answer += [i] return answer
./refactory/data/question_3/code/correct/correct_3_280.py
refactory_data_question_3_correct_3_510
def remove_extras(lst): newlst=[] for i in lst: if i not in newlst: newlst.append(i) return newlst
./refactory/data/question_3/code/correct/correct_3_510.py
refactory_data_question_3_correct_3_212
def remove_extras(lst): result = [] for item in lst: if item not in result: result += [item] return result
./refactory/data/question_3/code/correct/correct_3_212.py
refactory_data_question_3_correct_3_267
def remove_extras(lst): final=[] for x in lst: if x not in final: final.append(x) return final pass
./refactory/data/question_3/code/correct/correct_3_267.py
refactory_data_question_3_correct_3_035
def remove_extras(lst): newlist = [] for x in lst: if x not in newlist: newlist.append(x) return newlist
./refactory/data/question_3/code/correct/correct_3_035.py
refactory_data_question_3_correct_3_449
def remove_extras(mylist): newlist=[] for i in mylist: if i not in newlist: newlist.append(i) return newlist
./refactory/data/question_3/code/correct/correct_3_449.py
refactory_data_question_3_correct_3_065
def remove_extras(lst): new_lst = [] for i in lst: if i in new_lst: continue else: new_lst += [i,] return new_lst
./refactory/data/question_3/code/correct/correct_3_065.py
refactory_data_question_3_correct_3_068
def remove_extras(lst): list = [] for i in lst: if i not in list: list.append(i) return list
./refactory/data/question_3/code/correct/correct_3_068.py
refactory_data_question_3_correct_3_031
def remove_extras(lst): new = [] for i in lst: if i not in new: new = new + [i,] return new pass
./refactory/data/question_3/code/correct/correct_3_031.py
refactory_data_question_3_correct_3_322
def remove_extras(lst): result = [] for i in lst: if i not in result: result.append(i) return result pass
./refactory/data/question_3/code/correct/correct_3_322.py
refactory_data_question_3_correct_3_039
def remove_extras(lst): product = [] for i in lst: if i not in product: product.append(i) return product
./refactory/data/question_3/code/correct/correct_3_039.py
refactory_data_question_3_correct_3_385
def remove_extras(lst): a=[] for i in lst: if i not in a: a.append(i) return a
./refactory/data/question_3/code/correct/correct_3_385.py
refactory_data_question_3_correct_3_152
def remove_extras(lst): a = [] for ele in lst: if ele in a: continue else: a = a+[ele] return a
./refactory/data/question_3/code/correct/correct_3_152.py
refactory_data_question_3_correct_3_390
def remove_extras(lst): new = [] for i in range(len(lst)): if lst[i] not in new: new.append(lst[i]) return new
./refactory/data/question_3/code/correct/correct_3_390.py
refactory_data_question_3_correct_3_187
def remove_extras(lst): new_lst = [] for x in lst: if x not in new_lst: new_lst += [x] return new_lst
./refactory/data/question_3/code/correct/correct_3_187.py
refactory_data_question_3_correct_3_369
def remove_extras(lst): lst1=[] for i in range (len(lst)): if lst[i] not in lst1: lst1 += [lst[i]] return lst1
./refactory/data/question_3/code/correct/correct_3_369.py
refactory_data_question_3_correct_3_106
def remove_extras(lst): a = [] for i in lst: if i not in a: a += [i] return a
./refactory/data/question_3/code/correct/correct_3_106.py
refactory_data_question_3_correct_3_154
def remove_extras(lst): # your code here lst_new = [] for element in lst: if element not in lst_new: lst_new.append(element) return lst_new
./refactory/data/question_3/code/correct/correct_3_154.py
refactory_data_question_3_correct_3_101
def remove_extras(lst): s=[] for i in lst: if i not in s: s.append(i) return s pass
./refactory/data/question_3/code/correct/correct_3_101.py
refactory_data_question_3_correct_3_366
def remove_extras(lst): new_list =[] for i in lst: if i not in new_list: new_list.append(i) return new_list
./refactory/data/question_3/code/correct/correct_3_366.py
refactory_data_question_3_correct_3_320
def remove_extras(lst): new = [] for i in lst: if i not in new: new.append(i) return new
./refactory/data/question_3/code/correct/correct_3_320.py
refactory_data_question_3_correct_3_487
def remove_extras(lst): lst_new=[] for i in range (len(lst)): if lst[i] in lst_new: continue else: lst_new.append(lst[i]) return lst_new
./refactory/data/question_3/code/correct/correct_3_487.py
refactory_data_question_3_correct_3_008
def remove_extras(lst): new_lst = [] for i in lst: if i in new_lst: continue else: new_lst.append(i) return new_lst
./refactory/data/question_3/code/correct/correct_3_008.py
refactory_data_question_3_correct_3_017
def remove_extras(lst): new_lst = [] for i in lst: if i not in new_lst: new_lst += [i] return new_lst
./refactory/data/question_3/code/correct/correct_3_017.py
refactory_data_question_3_correct_3_232
def remove_extras(lst): result=[] for i in lst: if i in result: continue else: result+=[i,] return result pass
./refactory/data/question_3/code/correct/correct_3_232.py
refactory_data_question_3_correct_3_040
def remove_extras(lst): s = [] for i in lst: if i not in s: s.append(i) return s
./refactory/data/question_3/code/correct/correct_3_040.py
refactory_data_question_3_correct_3_516
def remove_extras(lst): new_list=[] for i in range(len(lst)): judge=0 for j in range(i): if lst[i]==lst[j]: judge=1 if judge==0: new_list+=[lst[i],] return new_list # your code here pass
./refactory/data/question_3/code/correct/correct_3_516.py
refactory_data_question_3_correct_3_342
def remove_extras(lst): new_lst = [] for i in lst: if i in new_lst: new_lst = new_lst else: new_lst += [i] return new_lst
./refactory/data/question_3/code/correct/correct_3_342.py
refactory_data_question_3_correct_3_159
def remove_extras(lst): new_list = [] n = len(lst) for counter1 in range(n): if lst[counter1] not in new_list: new_list.append(lst[counter1]) return new_list
./refactory/data/question_3/code/correct/correct_3_159.py
refactory_data_question_3_correct_3_301
def remove_extras(lst): new_lst = [] for i in lst: if i in new_lst: new_lst else: new_lst.append(i) return new_lst
./refactory/data/question_3/code/correct/correct_3_301.py
refactory_data_question_3_correct_3_149
def remove_extras(lst): s =[] for i in lst: if i not in s: s.append(i) return s
./refactory/data/question_3/code/correct/correct_3_149.py
refactory_data_question_3_correct_3_012
def remove_extras(lst): # your code here occurrences = () new_lst = [] for item in lst: if item not in occurrences: occurrences += (item,) new_lst.append(item) return new_lst
./refactory/data/question_3/code/correct/correct_3_012.py
refactory_data_question_3_correct_3_497
def remove_extras(lst): output = [] for item in lst: if item not in output: output.append(item) return output
./refactory/data/question_3/code/correct/correct_3_497.py