Python Tuples Hackerrank Solution