MCPcopy Create free account
hub / github.com/geekcomputers/Python / Repeat

Function Repeat

repeat.py:1–9  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

1def Repeat(x):
2 _size = len(x)
3 repeated = []
4 for i in range(_size):
5 k = i + 1
6 for j in range(k, _size):
7 if x[i] == x[j] and x[i] not in repeated:
8 repeated.append(x[i])
9 return repeated
10
11
12list1 = [10, 20, 30, 20, 20, 30, 40, 50, -20, 60, 60, -20, -20]

Callers 1

repeat.pyFile · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected