<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.<jupyter_code>list_of_palindromes=[]
    
a = list(range(100,1000)) # list of all 3 digit numbers
b = list(range(100,1000))

all_possible_multiples=[]


for x in a:
    for y in b:
        c=x*y
        all_possible_multiples.append(c)
    
for z in all_possible_multiples:
    if str(z)==str(z)[::-1]:     # I got this line " [::-1]" from http://stackoverflow.com/questions/19024371/generalized-project-euler-4. 
                                # because I did not know how to reverse the strings
        list_of_palindromes.append(z)
        
print (list_of_palindromes) # Checked to see if it worked, it did!

answer = max(list_of_palindromes)
print(answer) #906609 is my answer!





# This cell will be used for grading, leave it at the end of the notebook.<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09300184162062615, 'fraction_numerical': 0.040515653775322284, 'mean_word_length': 3.4008097165991904, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '501998', 'license': 'MIT', 'n_tokens_mistral': 398, 'n_tokens_neox': 349, 'n_words': 116, 'path': 'assignments/assignment02/ProjectEuler4.ipynb', 'repo_name': 'phungkh/phys202-2015-work', 'size': '1086'}