<jupyter_start><jupyter_text>Project Euler: Problem 52 https://projecteuler.net/problem=52It can be seen that the number, $125874$, and its double, $251748$, contain exactly the same digits, but in a different order.Find the smallest positive integer, $x$, such that $2x$, $3x$, $4x$, $5x$, and $6x$, contain the same digits. First, write a function `same_digits(x,y)` that returns `True` if two integers `x` and `y` have the exact same set of digits and multiplicities and `False` if they have different digits.<jupyter_code>def same_digits(x, y):
    """Do the integers x and y have the same digits, regardless of order."""
    q = list(filter(lambda x: x in y, y))
    p = list(filter(lambda y: y in x, x)) 

    
    for i in q:
        if i in p and len(q) == len(p):
            y = True
        else:
            y = False
    return y
#x ='132'; y = '321'
#
#q = list(filter(lambda x: x in y, y))
#p = list(filter(lambda y: y in x, x)) 
#
#for i in q:
#    if i in p:
#        y = True
#    else:
#        y = False
#print(y)

#
#print(q)
#print(p)
assert same_digits('132', '321')
assert not same_digits('123', '3')
assert not same_digits('456', '0987654321')<jupyter_output><empty_output><jupyter_text>Now use the `same_digits` function to solve this Euler problem. As you work on this problem, be careful to debug and test your code on small integers before trying it on the full search.<jupyter_code>xx=range(1,100)
yy=range(1,100)

pal_list =[]
for xnum in xx:
    for ynum in yy:
        pal_list.append((xnum, ynum))
        
list0 = str(pal_list)

# I found the list of the (x,y) combination for range 1 - 100.... I ran out of time :(
assert True # leave this cell to grade the solution<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12297921478060046, 'fraction_numerical': 0.036374133949191687, 'mean_word_length': 3.455012853470437, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '406557', 'license': 'MIT', 'n_tokens_mistral': 645, 'n_tokens_neox': 593, 'n_words': 238, 'path': 'midterm/ProjectEuler52.ipynb', 'repo_name': 'LimeeZ/phys292-2015-work', 'size': '1732'}