Python Find Longest Array In Math