id
stringlengths
35
39
content
stringlengths
44
3.85k
max_stars_repo_path
stringlengths
52
57
refactory_data_question_3_wrong_3_143
def remove_extras(lst): for i in range (0, len(lst)): for j in range (i + 1, len(lst)): if lst[j] == lst[i]: lst.pop(j) return remove_extras(lst)
./refactory/data/question_3/code/wrong/wrong_3_143.py
refactory_data_question_3_wrong_3_113
def remove_extras(lst): compare = lst[0] for element in lst[1:]: if element == compare: lst.remove(element) print(lst)
./refactory/data/question_3/code/wrong/wrong_3_113.py
refactory_data_question_3_wrong_3_214
def remove_extras(lst): i=0 while i<len(lst): curr = lst[i] new = [] for ele in lst: if ele == curr: continue new += [ele,] lst = new.copy i +=1
./refactory/data/question_3/code/wrong/wrong_3_214.py
refactory_data_question_3_wrong_3_061
def remove_extras(lst): o = [] for i in lst: if i not in o: o.append(lst.pop(i)) return o
./refactory/data/question_3/code/wrong/wrong_3_061.py
refactory_data_question_3_wrong_3_212
def remove_extras(lst): def position(i): n = len(lst) for j in range(n): if lst[j] == i: return j def helper(start,i): for k in lst[start:]: if k == i: lst.remove(k) else: pass for i in lst: index = position(i) helper(index+1,i) return lst
./refactory/data/question_3/code/wrong/wrong_3_212.py
refactory_data_question_3_wrong_3_181
def remove_extras(lst): lst.sort() i=0 while i<len(lst): if i==len(lst)-1: break elif lst[i]==lst[i+1]: lst.remove(lst[i]) else: i+=1 return lst
./refactory/data/question_3/code/wrong/wrong_3_181.py
refactory_data_question_3_wrong_3_273
def remove_extras(lst): result = lst[0] for e in lst: if e not in result: result += (e,) else: continue return result
./refactory/data/question_3/code/wrong/wrong_3_273.py
refactory_data_question_3_wrong_3_229
def remove_extras(lst): for i in lst: if lst.count(i) > 1: ((lst.reverse()).remove(i)).reverse return lst
./refactory/data/question_3/code/wrong/wrong_3_229.py
refactory_data_question_3_wrong_3_202
def remove_extras(lst): new_lst=[lst[0]] if lst==[]: return [] for i in range(len(lst)): a=lst[i] for h in range(i,len(lst)): if a!=lst[h]: ele=lst[h] if ele in new_lst: continue new_lst.append(ele) return new_lst
./refactory/data/question_3/code/wrong/wrong_3_202.py
refactory_data_question_3_wrong_3_011
def remove_extras(lst): for i in range(len(lst)-1): if lst[i] in lst[:i]+lst[i+1:]: lst.pop(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_011.py
refactory_data_question_3_wrong_3_117
def remove_extras(lst): newlist = [] for i in lst: if i in newlist: continue else: newlist += i return newlist
./refactory/data/question_3/code/wrong/wrong_3_117.py
refactory_data_question_3_wrong_3_118
def remove_extras(lst): new_lst = [] for ele in lst: if ele not in new_list: new_lst += ele return new_lst
./refactory/data/question_3/code/wrong/wrong_3_118.py
refactory_data_question_3_wrong_3_129
def remove_extras(lst): i = -1 while i < (-len(lst)): if lst[i] in lst[:i]: lst.pop[i] i = i - 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_129.py
refactory_data_question_3_wrong_3_008
def remove_extras(lst): lst1 = lst.reverse for i in lst: if lst.count(i) >1: j = 0 while j < i: lst1.remove(i) j += 1 return lst1.reverse
./refactory/data/question_3/code/wrong/wrong_3_008.py
refactory_data_question_3_wrong_3_190
def remove_extras(lst): for i in range (len(lst)-1): for j in lst[i+1:]: if j==lst[i]: lst.remove(j) return lst
./refactory/data/question_3/code/wrong/wrong_3_190.py
refactory_data_question_3_wrong_3_166
def remove_extras(lst): return set(lst)
./refactory/data/question_3/code/wrong/wrong_3_166.py
refactory_data_question_3_wrong_3_245
def remove_extras(lst): i=1 while True: if lst[i] in lst[:i]: del lst[i] continue if lst[i]==lst[-1]: break i=i+1 return lst
./refactory/data/question_3/code/wrong/wrong_3_245.py
refactory_data_question_3_wrong_3_055
def remove_extras(lst): new_lst = [] for new_lst in lst: if i not in lst: new_lst += [i,] return new_lst pass
./refactory/data/question_3/code/wrong/wrong_3_055.py
refactory_data_question_3_wrong_3_135
def remove_extras(lst): i = -1 while i >= (-len(lst)): if lst[i] in lst[:-1]: lst.pop(i) i = i - 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_135.py
refactory_data_question_3_wrong_3_275
def remove_extras(lst): result = lst[0] for e in lst: if e not in result: result.append(e) else: continue return result
./refactory/data/question_3/code/wrong/wrong_3_275.py
refactory_data_question_3_wrong_3_165
def remove_extras(lst): i = 0 while i < len(lst): if lst[0] in lst[1:]: lst.remove(lst[0]) i = i + 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_165.py
refactory_data_question_3_wrong_3_092
def remove_extras(lst): result = [] for item in lst: if item not in result: result += item return result
./refactory/data/question_3/code/wrong/wrong_3_092.py
refactory_data_question_3_wrong_3_267
def remove_extras(lst): lst = list(seq) if len(lst) >= abs(index): del lst[index] return tuple(lst) else: return seq
./refactory/data/question_3/code/wrong/wrong_3_267.py
refactory_data_question_3_wrong_3_122
def remove_extras(lst): seq = (lst[0],) for i in lst: if i not in seq: seq = seq + (i,) return seq
./refactory/data/question_3/code/wrong/wrong_3_122.py
refactory_data_question_3_wrong_3_171
def remove_extras(lst): one = [lst[0],] for repeat in lst: if repeat not in one: one += [repeat,] return one
./refactory/data/question_3/code/wrong/wrong_3_171.py
refactory_data_question_3_wrong_3_234
def remove_extras(lst): new_lst = [] for i in lst: if lst.count(i) == 1: new_lst.append(i) return new_lst
./refactory/data/question_3/code/wrong/wrong_3_234.py
refactory_data_question_3_wrong_3_249
def remove_extras(lst): new_list = [] for number in list: if number not in new_list: new_list.append(number) return new_list
./refactory/data/question_3/code/wrong/wrong_3_249.py
refactory_data_question_3_wrong_3_271
def remove_extras(lst): s = [] for i in lst: if i not in s: s.append(i)
./refactory/data/question_3/code/wrong/wrong_3_271.py
refactory_data_question_3_wrong_3_213
def remove_extras(lst): new_list = [] for element in lst: if element in new_list: continue else: new_list += new_list.append(element)
./refactory/data/question_3/code/wrong/wrong_3_213.py
refactory_data_question_3_wrong_3_198
def remove_extras(lst): new = [] for x in lst: if x not in new: new += x return new
./refactory/data/question_3/code/wrong/wrong_3_198.py
refactory_data_question_3_wrong_3_178
def remove_extras(lst): # your code here n = 0 while n < len(lst): lst = lst[n] + lst[n+1:].remove(lst[n]) n = n + 1 return lst pass
./refactory/data/question_3/code/wrong/wrong_3_178.py
refactory_data_question_3_wrong_3_295
def remove_extras(lst): keep = [] for i in lst : if i not in keep : keep.append(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_295.py
refactory_data_question_3_wrong_3_254
def remove_extras(lst): new_lst = [] if lst == []: return new_lst elif lst[0] in new_lst: return new_lst + remove_extras(lst[1:]) else: new_lst += [lst[0]] return new_lst + remove_extras(lst[1:])
./refactory/data/question_3/code/wrong/wrong_3_254.py
refactory_data_question_3_wrong_3_161
def remove_extras(lst): pst=[] for i in lst: if i not in pst: pst.extend(list(i)) return pst
./refactory/data/question_3/code/wrong/wrong_3_161.py
refactory_data_question_3_wrong_3_078
def remove_extras(lst): return list(set(lst)) # your code here pass
./refactory/data/question_3/code/wrong/wrong_3_078.py
refactory_data_question_3_wrong_3_057
def remove_extras(lst): new_lst = [] for i in lst: if lst not in new_lst: new_lst += [i,] return new_lst pass
./refactory/data/question_3/code/wrong/wrong_3_057.py
refactory_data_question_3_wrong_3_265
def remove_extras(lst): listt = lst.reverse() for element in listt: if listt.count(element) > 1: listt.remove(element) return listt.reverse()
./refactory/data/question_3/code/wrong/wrong_3_265.py
refactory_data_question_3_wrong_3_084
def remove_extras(lst): if lst == []: return [] elif lst[0] not in lst[1:]: return lst[0] + remove_extras(lst[1:]) else: return remove_extras(lst[1:])
./refactory/data/question_3/code/wrong/wrong_3_084.py
refactory_data_question_3_wrong_3_157
def remove_extras(lst): for i in lst: test_lst = lst.remove(i) if i not in test_lst: continue else: lst = lst.remove(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_157.py
refactory_data_question_3_wrong_3_030
def remove_extras(lst): return set(lst)
./refactory/data/question_3/code/wrong/wrong_3_030.py
refactory_data_question_3_wrong_3_024
def remove_extras(lst): return set(lst)
./refactory/data/question_3/code/wrong/wrong_3_024.py
refactory_data_question_3_wrong_3_281
def remove_extras(lst): new_list = () for x in lst: if x not in new_list: new_list += ((x)) return new_list
./refactory/data/question_3/code/wrong/wrong_3_281.py
refactory_data_question_3_wrong_3_260
def remove_extras(lst): for element in lst: if count(element) > 1: lst.remove(element) return lst
./refactory/data/question_3/code/wrong/wrong_3_260.py
refactory_data_question_3_wrong_3_026
def remove_extras(lst): result = [] counter = 0 while counter < len(lst): for i in lst[1:]: if lst[counter] == i: lst = lst.append(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_026.py
refactory_data_question_3_wrong_3_204
def remove_extras(lst): lst.sort() i = 0 while i <len(lst)-1: if lst[i+1] == lst[i]: lst.remove(lst[i]) else: i += 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_204.py
refactory_data_question_3_wrong_3_137
def remove_extras(lst): lst.reverse() if lst[0] in lst[1:]: lst.pop(0) lst.reverse() return lst
./refactory/data/question_3/code/wrong/wrong_3_137.py
refactory_data_question_3_wrong_3_294
def remove_extras(lst): keep = [] destroy = [] for i in lst : if i not in keep : keep.append(i) elif i in keep : destroy.append(i) for i in destroy : lst.remove(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_294.py
refactory_data_question_3_wrong_3_047
def remove_extras(lst): new = () for x in lst: if lst.count(x) > 1: new += [] else: new += [x,] return new pass
./refactory/data/question_3/code/wrong/wrong_3_047.py
refactory_data_question_3_wrong_3_070
def remove_extras(lst): #find the repeated index n = len(lst) for i in range(n): for j in range(n): if lst[i] == lst[j] and i != j: a = lst[:j]+lst[n-j:] else: continue return a
./refactory/data/question_3/code/wrong/wrong_3_070.py
refactory_data_question_3_wrong_3_089
def remove_extras(lst): 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:] sub_list.remove(elem) return lst[:lst.index(elem)] + sub_list
./refactory/data/question_3/code/wrong/wrong_3_089.py
refactory_data_question_3_wrong_3_197
def remove_extras(lst): return list(set(lst))
./refactory/data/question_3/code/wrong/wrong_3_197.py
refactory_data_question_3_wrong_3_227
def remove_extras(lst): for i in lst: if lst.count(i) > 1: lst.remove(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_227.py
refactory_data_question_3_wrong_3_012
def remove_extras(lst): result = [] for i in lst and not result: result += result + i return result
./refactory/data/question_3/code/wrong/wrong_3_012.py
refactory_data_question_3_wrong_3_266
def remove_extras(lst): listt = lst.copy() listtt = listt.reverse() for element in listtt: if listtt.count(element) > 1: listtt.remove(element) return listtt.reverse()
./refactory/data/question_3/code/wrong/wrong_3_266.py
refactory_data_question_3_wrong_3_009
def remove_extras(lst): for i in range(lst): if lst[i] in lst[:i]+lst[i+1:]: lst.pop(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_009.py
refactory_data_question_3_wrong_3_099
def remove_extras(lst): # your code here for item in st: while lst.count(item) != 1: lst.pop(item) return lst
./refactory/data/question_3/code/wrong/wrong_3_099.py
refactory_data_question_3_wrong_3_238
def remove_extras(lst): l=len(lst) for i in range(l): for j in range(i+1,l): if lst[i]==lst[j]: del lst[j] return lst
./refactory/data/question_3/code/wrong/wrong_3_238.py
refactory_data_question_3_wrong_3_250
def remove_extras(lst): newlist = [] for element in lst: if newlist.count(element)==0: newlist += element return newlist pass
./refactory/data/question_3/code/wrong/wrong_3_250.py
refactory_data_question_3_wrong_3_186
def remove_extras(lst): new_list = [] for elem in lst: if elem not in new: new.append(elem) else: new_list return new_list pass
./refactory/data/question_3/code/wrong/wrong_3_186.py
refactory_data_question_3_wrong_3_208
def remove_extras(lst): lst.sort() i = 1 n = len(lst) while i < n: if lst[i]==lst[i-1]: lst.remove(lst[i]) else: i += 1 n = len(lst) return lst pass
./refactory/data/question_3/code/wrong/wrong_3_208.py
refactory_data_question_3_wrong_3_052
def remove_extras(lst): return list(set(lst))
./refactory/data/question_3/code/wrong/wrong_3_052.py
refactory_data_question_3_wrong_3_015
def remove_extras(lst): result = [] for i in lst: if i not in result: result += result + [i] return result
./refactory/data/question_3/code/wrong/wrong_3_015.py
refactory_data_question_3_wrong_3_085
def remove_extras(lst): if lst == []: return [] elif lst[0] not in lst[1:]: return [lst[0],] + remove_extras(lst[1:]) else: return remove_extras(lst[1:])
./refactory/data/question_3/code/wrong/wrong_3_085.py
refactory_data_question_3_wrong_3_036
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/wrong/wrong_3_036.py
refactory_data_question_3_wrong_3_217
def remove_extras(lst): i=0 new = [] while i<=len(lst): curr = lst[i] for ele in lst: if ele == curr: continue new += [ele,] lst = new.copy new = [] i +=1 return lst
./refactory/data/question_3/code/wrong/wrong_3_217.py
refactory_data_question_3_wrong_3_236
def remove_extras(lst): l=len(lst) for i in l: for j in range(i+1,l): if lst[i]==lst[j]: del lst[j] return lst # your code here pass
./refactory/data/question_3/code/wrong/wrong_3_236.py
refactory_data_question_3_wrong_3_079
def remove_extras(lst): for i in lst: result=lst.count(i) while result>1: lst.remove(i) result=result-1 return lst
./refactory/data/question_3/code/wrong/wrong_3_079.py
refactory_data_question_3_wrong_3_019
def remove_extras(lst): i = 0 while i < len(lst): for j in range(i+1,len(lst)): if lst[i] == lst[j]: lst = lst[:j] + lst[j+1:] i += 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_019.py
refactory_data_question_3_wrong_3_136
def remove_extras(lst): new_list = [] for item in list: if new_list.count(item) == 0: new_list.append(item) return new_list
./refactory/data/question_3/code/wrong/wrong_3_136.py
refactory_data_question_3_wrong_3_288
def remove_extras(lst): new = [] for i in lst: for j in i: if j != i: new.append(j) return new
./refactory/data/question_3/code/wrong/wrong_3_288.py
refactory_data_question_3_wrong_3_095
def remove_extras(values): output = [] for value in values: if value not in seen: output.append(value) return output
./refactory/data/question_3/code/wrong/wrong_3_095.py
refactory_data_question_3_wrong_3_048
def remove_extras(lst): new = [] for x in lst: if lst.count(x) > 1: new += [] else: new = new.append(x) return new pass
./refactory/data/question_3/code/wrong/wrong_3_048.py
refactory_data_question_3_wrong_3_256
def remove_extras(lst): new_list = [] for elem in lst: if elem not in new_list: new_list += new_list.append(elem) return new_list
./refactory/data/question_3/code/wrong/wrong_3_256.py
refactory_data_question_3_wrong_3_108
def remove_extras(lst): # your code here result = (lst[0],) for item in lst[1:]: if item in result: continue else: result +=(item,) return list(result)
./refactory/data/question_3/code/wrong/wrong_3_108.py
refactory_data_question_3_wrong_3_200
def remove_extras(lst): new_lst=[lst[0]] if lst==[]: return [] for i in range(len(lst)): a=lst[i] for h in range(i,len(lst)): if a!=lst[h]: ele=lst[h] if ele in new_lst: continue new_lst.append(ele) return new_list
./refactory/data/question_3/code/wrong/wrong_3_200.py
refactory_data_question_3_wrong_3_116
def remove_extras(lst): result=[] for i in lst: if i not in result: result=result+i return result
./refactory/data/question_3/code/wrong/wrong_3_116.py
refactory_data_question_3_wrong_3_297
def remove_extras(lst): new = [] x = 0 while x < len(lst)+1: if lst[x] in new: new += [lst[x]] else: continue return new
./refactory/data/question_3/code/wrong/wrong_3_297.py
refactory_data_question_3_wrong_3_237
def remove_extras(lst): l=len(lst) for i in l: for j in range(i+1,l): if lst[i]==lst[j]: del lst[j] return lst
./refactory/data/question_3/code/wrong/wrong_3_237.py
refactory_data_question_3_wrong_3_191
def remove_extras(lst): check=True lst1=[] for i in lst: for j in lst1: if j==i: check=False if check: lst1+=[i,] return lst1
./refactory/data/question_3/code/wrong/wrong_3_191.py
refactory_data_question_3_wrong_3_087
def remove_extras(lst): a = () n = len(lst) for i in range(n): for j in range(i,n): if lst[i] == lst[j] and i != j: a += (lst[j],) else: continue c = a[:-1] b = lst[::-1] for i in range(len(c)): b.remove(c[i]) d = b[::-1] return d
./refactory/data/question_3/code/wrong/wrong_3_087.py
refactory_data_question_3_wrong_3_150
def remove_extras(lst): for i in range(1,len(lst)): if i in lst[i:]: lst = lst.remove(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_150.py
refactory_data_question_3_wrong_3_126
def remove_extras(lst): seq = (lst[0],) for i in lst: if i not in seq: seq = seq + (i,) return seq
./refactory/data/question_3/code/wrong/wrong_3_126.py
refactory_data_question_3_wrong_3_195
def remove_extras(lst): n = len(lst) for counter1 in range(n): for counter2 in range(n): if lst[counter1] == lst[counter2]: lst = lst[:counter1] + lst[counter1 + 1:] return lst
./refactory/data/question_3/code/wrong/wrong_3_195.py
refactory_data_question_3_wrong_3_134
def remove_extras(lst): i = -1 while i >= (-len(lst)): if lst[i] in lst[:i]: lst.pop(i) i = i - 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_134.py
refactory_data_question_3_wrong_3_222
def remove_extras(lst): new_lst = [] for i in list: if i not in lst[i:]: new_lst = lst.append(i) return new_lst pass
./refactory/data/question_3/code/wrong/wrong_3_222.py
refactory_data_question_3_wrong_3_042
def remove_extras(lst): return list(set(lst))
./refactory/data/question_3/code/wrong/wrong_3_042.py
refactory_data_question_3_wrong_3_018
def remove_extras(lst): for i in range(len(lst)): for j in range(i+1, len(lst)): if lst[j] == lst[i]: lst = lst[:j] + lst[j+1:] return lst
./refactory/data/question_3/code/wrong/wrong_3_018.py
refactory_data_question_3_wrong_3_173
def remove_extras(lst): for i in range(len(lst)-1): for j in range(i+1,len(lst[1:])): if lst[i] == lst[j]: del lst[j] return lst
./refactory/data/question_3/code/wrong/wrong_3_173.py
refactory_data_question_3_wrong_3_146
def remove_extras(lst): new_lst = [] for i in lst: new_lst.append(i) if new_lst.count(i) > 1: new_lst.pop continue return new_lst
./refactory/data/question_3/code/wrong/wrong_3_146.py
refactory_data_question_3_wrong_3_151
def remove_extras(lst): result = [] for ele in lst: if x not in result: result += x return result
./refactory/data/question_3/code/wrong/wrong_3_151.py
refactory_data_question_3_wrong_3_065
def remove_extras(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/wrong/wrong_3_065.py
refactory_data_question_3_wrong_3_127
def remove_extras(lst): seq = [lst[0],] for i in lst: if i not in seq: seq = seq + [i,] return seq
./refactory/data/question_3/code/wrong/wrong_3_127.py
refactory_data_question_3_wrong_3_232
def remove_extras(lst): new_lst = [] for i in lst: if lst.count(i) == 1: lst.append(i) return neW_lst
./refactory/data/question_3/code/wrong/wrong_3_232.py
refactory_data_question_3_wrong_3_177
def remove_extras(lst): # your code here n = 0 while n < len(lst): lst = lst[n] + lst[n+1:].remove(lst[n]) n = n + 1 pass
./refactory/data/question_3/code/wrong/wrong_3_177.py
refactory_data_question_3_wrong_3_109
def remove_extras(lst): for k in range(len(lst)): if lst[k] in lst[:k]: return lst[:k] + lst[k+1:] else: return lst
./refactory/data/question_3/code/wrong/wrong_3_109.py
refactory_data_question_3_wrong_3_257
def remove_extras(lst): new_list = [] for elem in lst: if elem not in new_list: new_list = new_list.append(elem) return new_list
./refactory/data/question_3/code/wrong/wrong_3_257.py
refactory_data_question_3_wrong_3_253
def remove_extras(lst): # your code here new_list = [] for i in lst: if i not in new_list: new_list = new_list + i return new_list
./refactory/data/question_3/code/wrong/wrong_3_253.py
refactory_data_question_3_wrong_3_004
def remove_extras(lst): # your code here occurrences = () new_lst = [] for item in lst: if item not in occurrences: occurrences += (item,) new_list.append(item) return new_lst
./refactory/data/question_3/code/wrong/wrong_3_004.py
refactory_data_question_3_wrong_3_103
def remove_extras(lst): a = [] for i in lst: if i not in a: a.append(i) return i
./refactory/data/question_3/code/wrong/wrong_3_103.py
refactory_data_question_3_wrong_3_021
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:] j += 1 i += 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_021.py