I wrote the program however I wonder how can I edit and show in the output the two products from which I got the output:

```
def check_palindrome(s):
"""Checks whether the given string is palindrome"""
return s == s[::-1]
max_product = 0
for i in range(999, 900, -1):
for j in range(i, 900, -1):
product = i * j
if check_palindrome(str(product)):
max_product = max(max_product, product)
print(max_product)
```

In the same way you are updating

`max_product`

, you can use two more variables (`a`

and`b`

) and keep updating them when necessary (when`product`

is greater than`max_product`

):Also, you can use this for updating, and for shorter code: