<jupyter_start><jupyter_text>Project Euler: Problem 4 https://projecteuler.net/problem=4A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.Find the largest palindrome made from the product of two 3-digit numbers. First, I defined two lists which hold the values of all three digit numbers<jupyter_code>a = range(100, 1000)
b = range(100, 1000)<jupyter_output><empty_output><jupyter_text>Then I created an empty list, which would hold all the palindromes created from multiplying those three digit numbers.<jupyter_code>lst = []<jupyter_output><empty_output><jupyter_text>Using two for loops, I looped through all the values in a, multiplying them by all the possible values of b, and calling the product p.  Using an if statement, I turned the product into a string and compared whether it was the same fowards as backwards.  If it was, I appended it to my list of palindromes.<jupyter_code>for x in a:
    for y in b:
        p = x * y
        if str(p) == str(p)[::-1]:
            lst.append(p)<jupyter_output><empty_output><jupyter_text>Finally, I printed the maximum palindrome using the built in max function.<jupyter_code>print(max(lst))
# This cell will be used for grading, leave it at the end of the notebook.<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07362885048835462, 'fraction_numerical': 0.0202854996243426, 'mean_word_length': 4.716738197424893, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '377303', 'license': 'MIT', 'n_tokens_mistral': 430, 'n_tokens_neox': 393, 'n_words': 174, 'path': 'assignments/assignment02/ProjectEuler4.ipynb', 'repo_name': 'bjshaw/phys202-2015-work', 'size': '1331'}