human
I found an interesting problem on https://www.codewars.com/kata/55befc42bfe4d13ab1000007:
Linked Lists - Get Nth

Implement a GetNth() function that takes a linked list and an integer index and returns the node stored at the Nth index position. GetNth() uses the C numbering convention that the first node is index 0, the second is index 1, ... and so on. So for the list 42 -> 13 -> 666, GetNth() with index 1 should return Node(13);

The index should be in the range [0..length-1]. If it is not, GetNth() should throw/raise an exception (`ArgumentException` in C#, `InvalidArgumentException` in PHP). You should also raise an exception (`ArgumentException` in C#, `InvalidArgumentException` in PHP) if the list is empty/null/None.

Prerequisite Kata (may be in beta):

- Linked Lists - Push & BuildOneTwoThree
- Linked Lists - Length & Count

> The push() and buildOneTwoThree() (`BuildOneTwoThree` in C#, `build_one_two_three()` in PHP) functions do not need to be redefined.

I tried it in Python, but could not do it. Can you solve it?

=====
What is a the Python program you requested?
assistant
#Here is the Python program you requested.

class Node(object):
    def __init__(self, data):
        self.data = data
        self.next = None
    
def get_nth(node, index):
    assert(node and index >= 0)
    for _ in range(index):
        node = node.next
        assert(node)
    return node