Remove redundant if from short.py

This commit is contained in:
Luciano Ramalho 2025-05-22 02:18:34 -03:00 committed by GitHub
parent 3d5588b75e
commit cc4e26c67a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,10 +41,9 @@ def shorten(n: int) -> str:
Get Nth short URL made from SDIGITS, where 0 is the first.
"""
iter_short = gen_short()
for i in range(n+1):
for _ in range(n+1):
short = next(iter_short)
if i == n:
return short
return short
def gen_free_short(redirects: dict) -> Iterator[str]: