Geeksforgeeks Python Coding Question