Any Or All Hackerrank Solution Python