Project Euler #4 - Largest Palindrome Project - Python
Look at my previous answer


palindrome is divisible by 11
i and j can be only odd
reverse loops 999 -&gt; 1 and 999 -&gt; i - 1 - first found palindrome less than n is our palindrome


Simplify code

str(num) is expensive, do it once

def is_palindrome(num):
    snum = str(num)
    return if snum == snum[::-1]


Instead of prod &gt; largest and prod &lt; num You can write num &gt; prod &gt; largest

Use list comprehension

limits = [int(input().strip()) for _ in range(limit)]