From cc4e26c67a4fbe7a84094b7d1c6fffe3fddc1f45 Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Thu, 22 May 2025 02:18:34 -0300 Subject: [PATCH] Remove redundant if from short.py --- links/short.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/links/short.py b/links/short.py index a9ae96c..0e95b55 100755 --- a/links/short.py +++ b/links/short.py @@ -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]: