I am trying to solve this question using python3 and I am new to this language. Here is my code:
class Solution:
def __init__(self): self.result =