I\'ve been trting to find a way to implement the ans variable from various other languages into python. The ans variable stores the last solution, and
ans