We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 636d0f5 commit 47d73e0Copy full SHA for 47d73e0
clones/fib2.py
@@ -1,5 +1,5 @@
1
-n = 5
2
-a, b = 0, 1
3
-for _ in range(n):
4
- a, b = b, a + b
5
-print(a)
+def fib(n):
+ a, b = 0, 1
+ for _ in range(n):
+ a, b = b, a + b
+ return a
clones/single_file.py
@@ -1,12 +1,16 @@
# Here's the first example of duplication
-with open("file1.py") as f:
- for line in f:
- print(line)
- print()
+def remove_duplicates(items):
+ result = []
+ for item in items:
+ if item not in result:
6
+ result.append(item)
7
+ return result
8
9
10
# Here's the second example of duplication
11
12
+def remove_duplicates1(items):
13
14
15
16
0 commit comments