Skip to content

Commit cc4e26c

Browse files
authored
Remove redundant if from short.py
1 parent 3d5588b commit cc4e26c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

links/short.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ def shorten(n: int) -> str:
4141
Get Nth short URL made from SDIGITS, where 0 is the first.
4242
"""
4343
iter_short = gen_short()
44-
for i in range(n+1):
44+
for _ in range(n+1):
4545
short = next(iter_short)
46-
if i == n:
47-
return short
46+
return short
4847

4948

5049
def gen_free_short(redirects: dict) -> Iterator[str]:

0 commit comments

Comments
 (0)