Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cc4e26c

Browse filesBrowse files
authored
Remove redundant if from short.py
1 parent 3d5588b commit cc4e26c
Copy full SHA for cc4e26c

File tree

1 file changed

+2
-3
lines changed
Filter options

1 file changed

+2
-3
lines changed

‎links/short.py

Copy file name to clipboardExpand all lines: links/short.py
+2-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.