The following code is an attempt of mine to solve the problem 4 of euler project.
However i am not looking for the problem’s solution in this topic.
My problem is that whenever i try to print the following, it throws me an error like so:
list" object cannot be interpreted as an integer.
l = list(range(0, 998002)) # the number "998002" is the largest number that can be produced by multiplying two 3-digit numbers. def palindrome(): for a in range(l): # the problem seems to be in the foor loop.... for b in (l): pal = a * b x = str(pal) y = str(a) z = str(b) if y == 3 and z == 3 and x[0:len(pal)] == x[::-1]: return pal
Can someone please explain me why that’s happening?
Also, i’d really appreciate any suggestions on how to tuckle this issue.