Adopted new convention from template

This commit is contained in:
David Doblas Jiménez 2022-09-21 20:44:42 +02:00
parent f7f87e03a3
commit 836d22e271

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""
Created on 18 Mar 2017
@ -20,9 +20,10 @@ def compute():
Find the largest palindrome made from the product of two 3-digit numbers.
"""
ans = 0
for i in range(100, 1000):
for j in range(100, 1000):
for i in range(100, 1_000):
for j in range(100, 1_000):
palindrome = i * j
s = str(palindrome)
if s == s[::-1] and palindrome > ans:
@ -32,5 +33,4 @@ def compute():
if __name__ == "__main__":
print(f"Result for problem 4: {compute()}")
print(f"Result for problem 4 is {compute()}")